diff --git a/src/main.rs b/src/main.rs index a6c33bc..dfd900b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,8 +46,9 @@ fn main() -> Result<(), Box> { let mut config = get_config(&options)?; - clap_matches.value_of("database_path") - .map(|x| config.database_path = x.into()); + if let Some(db_path) = clap_matches.value_of("database_path") { + config.database_path = db_path.into(); + } #[cfg(debug_assertions)] println!("{:?}", options); @@ -64,7 +65,6 @@ async fn connect_sqlite(path: &PathBuf) -> sqlx::Result { SqliteConnection::connect_with(&connect_options).await } -/// fn get_config(options: &Options) -> std::io::Result { let mut config_file = File::open(&options.config)?; let mut config_string = String::new();