From f6ca5bace49cea7539422cbe7bfcbecfb63f823b Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Mon, 29 May 2017 12:01:07 -0700 Subject: [PATCH] Autoformat --- src/config.rs | 8 ++++++-- src/main.rs | 18 ++++++++++++------ src/utils.rs | 5 ++++- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/config.rs b/src/config.rs index 7203f5c..3a32a04 100644 --- a/src/config.rs +++ b/src/config.rs @@ -63,12 +63,16 @@ impl Config { if vfs_config.mount_points.contains_key(&dir.name) { bail!("Conflicting mount directories"); } - vfs_config.mount_points.insert(dir.name.to_owned(), clean_path_string(dir.source.as_str())); + vfs_config + .mount_points + .insert(dir.name.to_owned(), clean_path_string(dir.source.as_str())); } // Init Index config let mut index_config = IndexConfig::new(); - index_config.album_art_pattern = user_config.album_art_pattern.and_then(|s| Regex::new(s.as_str()).ok()); + index_config.album_art_pattern = user_config + .album_art_pattern + .and_then(|s| Regex::new(s.as_str()).ok()); if let Some(duration) = user_config.reindex_every_n_seconds { index_config.sleep_duration = duration; } diff --git a/src/main.rs b/src/main.rs index 8301d2e..ac1ed3f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,18 +18,24 @@ extern crate oven; extern crate params; extern crate regex; extern crate serde; -#[macro_use] extern crate serde_derive; +#[macro_use] +extern crate serde_derive; extern crate serde_json; extern crate staticfile; extern crate sqlite; extern crate toml; extern crate url; -#[cfg(windows)] extern crate uuid; -#[cfg(windows)] extern crate winapi; -#[cfg(windows)] extern crate kernel32; -#[cfg(windows)] extern crate shell32; -#[cfg(windows)] extern crate user32; +#[cfg(windows)] +extern crate uuid; +#[cfg(windows)] +extern crate winapi; +#[cfg(windows)] +extern crate kernel32; +#[cfg(windows)] +extern crate shell32; +#[cfg(windows)] +extern crate user32; use errors::*; use getopts::Options; diff --git a/src/utils.rs b/src/utils.rs index f0dbbff..9eeffa8 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -4,7 +4,10 @@ use std::fs; use errors::*; -const APP_INFO: AppInfo = AppInfo{name: "Polaris", author: "Permafrost"}; +const APP_INFO: AppInfo = AppInfo { + name: "Polaris", + author: "Permafrost", +}; pub fn get_config_root() -> Result { if let Ok(root) = app_root(AppDataType::UserConfig, &APP_INFO) {