diff options
author | Conrad Dean <conrad.p.dean@gmail.com> | 2019-04-13 22:03:06 -0400 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-04-20 13:04:39 +0200 |
commit | 25c54c54a90b88035a51abe975d1f50e85e7ad83 (patch) | |
tree | b80fe1615b78091149f8d95ff44c0fd2a6701c56 | |
parent | 7a8a6a08400ac78fa88464171514389700268ab7 (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.rs | 2 |
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![])); } |