summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConrad Dean <conrad.p.dean@gmail.com>2019-04-13 22:03:06 -0400
committerrabite <rabite@posteo.de>2019-04-20 13:04:39 +0200
commit25c54c54a90b88035a51abe975d1f50e85e7ad83 (patch)
treeb80fe1615b78091149f8d95ff44c0fd2a6701c56
parent7a8a6a08400ac78fa88464171514389700268ab7 (diff)
fix lscolors config if environment variable not set
Per the lscolors crate docs, this switches from an `unwrap` to `unwrap_or_default` so that this does not panic when this environment variable is not set for the user, fixing a crash on startup in hunter.
-rw-r--r--src/files.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/files.rs b/src/files.rs
index 8186cf8..c240920 100644
--- a/src/files.rs
+++ b/src/files.rs
@@ -28,7 +28,7 @@ use crate::widget::Events;
lazy_static! {
- static ref COLORS: LsColors = LsColors::from_env().unwrap();
+ static ref COLORS: LsColors = LsColors::from_env().unwrap_or_default();
static ref TAGS: RwLock<(bool, Vec<PathBuf>)> = RwLock::new((false, vec![]));
}