summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-11-26 14:50:29 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-26 14:50:29 +0100
commitba2f301e946ee9192229ff67ac9cb6dc90e162d2 (patch)
tree99d4185a6a4e11b73e0741e6b894e56c0bb849e3 /src/main.rs
parent68552db7631f21534ea1cdd0caf7d4c7b6de55ae (diff)
Update dependency: clap: 3.0.0-beta.1 -> 3.0.0-beta.2
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs
index b048c8f..5f812ab 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -67,49 +67,50 @@ async fn main() -> Result<()> {
let db_connection_config = crate::db::parse_db_connection_config(&config, &cli);
match cli.subcommand() {
- ("db", Some(matches)) => crate::commands::db(db_connection_config, &config, matches)?,
- ("build", Some(matches)) => {
+ Some(("db", matches)) => crate::commands::db(db_connection_config, &config, matches)?,
+ Some(("build", matches)) => {
let conn = crate::db::establish_connection(db_connection_config)?;
let repo = load_repo()?;
crate::commands::build(matches, progressbars, conn, &config, repo, &repo_path, max_packages as u64).await?
},
- ("what-depends", Some(matches)) => {
+ Some(("what-depends", matches)) => {
let repo = load_repo()?;
let bar = progressbars.what_depends();
bar.set_length(max_packages);
crate::commands::what_depends(matches, &config, repo).await?
},
- ("dependencies-of", Some(matches)) => {
+ Some(("dependencies-of", matches)) => {
let repo = load_repo()?;
let bar = progressbars.what_depends();
bar.set_length(max_packages);
crate::commands::dependencies_of(matches, &config, repo).await?
},
- ("versions-of", Some(matches)) => {
+ Some(("versions-of", matches)) => {
let repo = load_repo()?;
crate::commands::versions_of(matches, repo).await?
},
- ("env-of", Some(matches)) => {
+ Some(("env-of", matches)) => {
let repo = load_repo()?;
crate::commands::env_of(matches, repo).await?
},
- ("find-pkg", Some(matches)) => {
+ Some(("find-pkg", matches)) => {
let repo = load_repo()?;
crate::commands::find_pkg(matches, &config, repo).await?
},
- ("source", Some(matches)) => {
+ Some(("source", matches)) => {
let repo = load_repo()?;
crate::commands::source(matches, &config, repo, progressbars).await?
}
- (other, _) => return Err(anyhow!("Unknown subcommand: {}", other)),
+ Some((other, _)) => return Err(anyhow!("Unknown subcommand: {}", other)),
+ None => return Err(anyhow!("No subcommand")),
}
Ok(())