Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
5ebbcb774a
commit
27b75ba2fc
1 changed files with 1 additions and 2 deletions
|
@ -27,7 +27,6 @@ use crate::viewer::Viewer;
|
|||
use failure::Fallible as Result;
|
||||
use failure::ResultExt;
|
||||
use failure::Error;
|
||||
use failure::err_msg;
|
||||
|
||||
pub struct EditorView<'a>(&'a Runtime<'a>);
|
||||
|
||||
|
@ -43,7 +42,7 @@ impl<'a> Viewer for EditorView<'a> {
|
|||
{
|
||||
let mut entry = e.to_str()?.clone().to_string();
|
||||
edit_in_tmpfile(self.0, &mut entry)
|
||||
.context(err_msg("Error while viewing"))
|
||||
.context("Error while viewing")
|
||||
.map_err(Error::from)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue