@@ 30,6 30,8 @@ pub enum EditTempfileError {
IdenticalContents,
/// An error variant indicating that there was an input/output error when editing the file.
InputOutputError(io::Error),
+ /// An error variant indicating that there was an error spawning the editor process.
+ EditorError(dialoguer::Error),
}
impl fmt::Display for EditTempfileError {
@@ 114,7 116,7 @@ pub fn edit_tempfile(
let buf = if let Some(buf) = editor
.edit(&contents)
- .map_err(EditTempfileError::InputOutputError)?
+ .map_err(EditTempfileError::EditorError)?
{
buf
} else {