summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2021-03-03 13:59:38 -0500
committerGitHub <noreply@github.com>2021-03-03 13:59:38 -0500
commit5de4b05718a898b60af19e982952d7b3d78ba4d5 (patch)
tree00d8747ebb095a948acc583c943a8efef32ac52f
parent64c93a7f8a4babe7ef794ed053cb06baef1dcd3b (diff)
Use unwrap_or_else(|| panic!("...")) instead of .expect("...") (#525)
This is a local style rule. IMO .expect("...") doesn't work as the name for this operation.
-rw-r--r--src/bat_utils/dirs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bat_utils/dirs.rs b/src/bat_utils/dirs.rs
index 1706f10a..623b7e2c 100644
--- a/src/bat_utils/dirs.rs
+++ b/src/bat_utils/dirs.rs
@@ -37,5 +37,5 @@ impl BatProjectDirs {
lazy_static! {
pub static ref PROJECT_DIRS: BatProjectDirs =
- BatProjectDirs::new().expect("Could not get home directory");
+ BatProjectDirs::new().unwrap_or_else(|| panic!("Could not get home directory"));
}