panic -> expect

This commit is contained in:
Svyatoslav Nikolsky 2016-11-25 12:39:14 +03:00
parent 469c0481ee
commit 0164ac95cb
1 changed files with 1 additions and 3 deletions

View File

@ -38,8 +38,6 @@ pub fn init_db(cfg: &Config, db: &db::SharedStore) -> Result<(), String> {
fn custom_path(data_dir: &str, sub_dir: &str) -> PathBuf {
let mut path = PathBuf::from(data_dir);
path.push(sub_dir);
if let Err(e) = create_dir_all(&path) {
panic!("Failed to get app dir: {}", e);
}
create_dir_all(&path).expect("Failed to get app dir");
path
}