use expect instead of assert

This commit is contained in:
Greg Coppola
2022-01-13 13:15:54 +00:00
parent 342bc6612e
commit 90e6a88e7c

View File

@@ -780,7 +780,10 @@ impl Config {
pub fn get_estimates_path(&self) -> PathBuf {
let mut path = self.get_chainstate_path();
path.push("estimates");
assert!(fs::create_dir_all(&path).is_ok());
fs::create_dir_all(&path).expect(&format!(
"Failed to create `estimates` directory at {}",
path.to_string_lossy()
));
path
}