From 76bacdca084c09b7474ef1198a57ffb6ee5b0839 Mon Sep 17 00:00:00 2001 From: EliasSchriefer Date: Thu, 8 Jul 2021 15:29:43 +0200 Subject: [PATCH] Remove some whitespace We definitely need a rustfmt config at some point --- src/main.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1521117..3939b2d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -68,7 +68,7 @@ async fn main() -> Result<(), Box> { } let mut config = get_config(&options)?; - + if let Some(db_path) = clap_matches.value_of("database_path") { config.database_path = db_path.into(); } @@ -98,14 +98,13 @@ async fn connect_sqlite(path: &PathBuf) -> sqlx::Result { async fn load_sqlite_template(sqlite_handle: &mut SqliteConnection) -> sqlx::Result { sqlx::query(&*format!( "{} {} {} {} {} {}", - include_str!("sqlite/users.sql"), - include_str!("sqlite/security_preferences.sql"), - include_str!("sqlite/privacy_preferences.sql"), - include_str!("sqlite/notification_preferences.sql"), - include_str!("sqlite/external_servers_privacy_preferences.sql"), + include_str!("sqlite/users.sql"), + include_str!("sqlite/security_preferences.sql"), + include_str!("sqlite/privacy_preferences.sql"), + include_str!("sqlite/notification_preferences.sql"), + include_str!("sqlite/external_servers_privacy_preferences.sql"), include_str!("sqlite/external_servers_preferences.sql"), )).execute(sqlite_handle).await - } fn get_config(options: &Options) -> std::io::Result { @@ -115,10 +114,10 @@ fn get_config(options: &Options) -> std::io::Result { let mut config_file = File::open(&options.config)?; let mut config_string = String::new(); config_file.read_to_string(&mut config_string)?; - + toml::from_str(&config_string) .map_err(|err| std::io::Error::new( - std::io::ErrorKind::InvalidData, + std::io::ErrorKind::InvalidData, err ) )