Edit for readability
This commit is contained in:
parent
e68fc11e43
commit
caf9bd299a
@ -46,8 +46,9 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
|
||||
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> {
|
||||
SqliteConnection::connect_with(&connect_options).await
|
||||
}
|
||||
|
||||
///
|
||||
fn get_config(options: &Options) -> std::io::Result<Config> {
|
||||
let mut config_file = File::open(&options.config)?;
|
||||
let mut config_string = String::new();
|
||||
|
Loading…
Reference in New Issue
Block a user