summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 69dd0fa..7feb99b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -146,7 +146,7 @@ async fn main() -> Result<()> {
Ok(repo)
};
- let db_connection_config = crate::db::parse_db_connection_config(&config, &cli)?;
+ let db_connection_config = crate::db::DbConnectionConfig::parse(&config, &cli)?;
match cli.subcommand() {
Some(("generate-completions", matches)) => generate_completions(matches),
Some(("db", matches)) => {
@@ -154,7 +154,7 @@ async fn main() -> Result<()> {
crate::commands::db(db_connection_config, &config, matches)?
},
Some(("build", matches)) => {
- let conn = crate::db::establish_connection(db_connection_config)?;
+ let conn = db_connection_config.establish_connection()?;
let repo = load_repo()?;
@@ -205,7 +205,7 @@ async fn main() -> Result<()> {
Some(("find-artifact", matches)) => {
let repo = load_repo()?;
setup_pager();
- let conn = crate::db::establish_connection(db_connection_config)?;
+ let conn = db_connection_config.establish_connection()?;
crate::commands::find_artifact(matches, &config, progressbars, repo, conn)
.await
.context("find-artifact command failed")?
@@ -252,7 +252,7 @@ async fn main() -> Result<()> {
Some(("metrics", _)) => {
let repo = load_repo()?;
setup_pager();
- let conn = crate::db::establish_connection(db_connection_config)?;
+ let conn = db_connection_config.establish_connection()?;
crate::commands::metrics(&repo_path, &config, repo, conn)
.await
.context("metrics command failed")?