Merge pull request #188 from ethcore/panic_to_expect

Replaced panic!() with expect()
This commit is contained in:
Nikolay Volf 2016-11-25 12:56:05 +03:00 committed by GitHub
commit f4e5130faf
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
}