diff options
author | rabite <rabite@posteo.de> | 2020-01-25 00:50:28 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2020-01-25 01:00:48 +0100 |
commit | 682a284afa3bd74a1733becd3ad7251ba103254f (patch) | |
tree | 1e42c91c1cf2b828f692c047e7be967136770193 /src/fscache.rs | |
parent | b18e86f28e556c5834912b05c4e2e30b1d4dbd54 (diff) |
remove backtraces from HError
Diffstat (limited to 'src/fscache.rs')
-rw-r--r-- | src/fscache.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/fscache.rs b/src/fscache.rs index ff41b0f..bf5ab2f 100644 --- a/src/fscache.rs +++ b/src/fscache.rs @@ -10,7 +10,7 @@ use std::path::PathBuf; use crate::files::{Files, File, SortBy}; use crate::widget::Events; -use crate::fail::{HResult, HError, ErrorLog, Backtrace, ArcBacktrace}; +use crate::fail::{HResult, HError, ErrorLog}; pub type CachedFiles = (Option<File>, Async<Files>); @@ -263,7 +263,7 @@ impl FsCache { let mut files = file_cache.read() .map_err(|e| HError::from(e))? .get(&dir) - .ok_or(HError::NoneError(Backtrace::new_arced()))? + .ok_or(HError::NoneError)? .clone(); let tab_settings = &tab_settings; @@ -406,11 +406,9 @@ impl TryFrom<DebouncedEvent> for FsEvent { File::new_from_path(&new_path, None)?), DebouncedEvent::Error(err, path) - => Err(HError::INotifyError(format!("{}, {:?}", err, path), - Backtrace::new_arced()))?, + => Err(HError::INotifyError(format!("{}, {:?}", err, path)))?, DebouncedEvent::Rescan - => Err(HError::INotifyError("Need to rescan".to_string(), - Backtrace::new_arced()))?, + => Err(HError::INotifyError("Need to rescan".to_string()))?, // Ignore NoticeRemove/NoticeWrite _ => None?, }; @@ -499,11 +497,9 @@ impl PathFromEvent for DebouncedEvent { DebouncedEvent::NoticeRemove(path) => Ok(path), DebouncedEvent::Rename(old_path, _) => Ok(old_path), DebouncedEvent::Error(err, path) - => Err(HError::INotifyError(format!("{}, {:?}", err, path), - Backtrace::new_arced())), + => Err(HError::INotifyError(format!("{}, {:?}", err, path))), DebouncedEvent::Rescan - => Err(HError::INotifyError("Need to rescan".to_string(), - Backtrace::new_arced())) + => Err(HError::INotifyError("Need to rescan".to_string())) } } |