Autoformat

This commit is contained in:
Antoine Gersant 2017-05-29 12:01:07 -07:00
parent 8eaefb6dba
commit f6ca5bace4
3 changed files with 22 additions and 9 deletions

View file

@ -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;
}

View file

@ -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;

View file

@ -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<PathBuf> {
if let Ok(root) = app_root(AppDataType::UserConfig, &APP_INFO) {