From fc9c786df7eae325d9b5eb6f61c662d34ce94698 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 24 Mar 2016 12:30:31 +0100 Subject: [PATCH] We can match for true/false instead of true/_ --- libimagrt/src/edit.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libimagrt/src/edit.rs b/libimagrt/src/edit.rs index 73529b53..8d1efd70 100644 --- a/libimagrt/src/edit.rs +++ b/libimagrt/src/edit.rs @@ -49,15 +49,15 @@ pub fn edit_in_tmpfile(rt: &Runtime, s: &mut String) -> EditResult<()> { let exit_status = editor.arg(file_path).status(); match exit_status.map(|s| s.success()) { - Ok(true) => { + Ok(true) => { file.sync_data() .and_then(|_| file.seek(SeekFrom::Start(0))) .and_then(|_| file.read_to_string(s)) .map(|_| ()) .map_err(|e| RuntimeError::new(RuntimeErrorKind::IOError, Some(Box::new(e)))) }, - Ok(_) => Err(RuntimeError::new(RuntimeErrorKind::ProcessExitFailure, None)), - Err(e) => Err(RuntimeError::new(RuntimeErrorKind::IOError, Some(Box::new(e)))), + Ok(false) => Err(RuntimeError::new(RuntimeErrorKind::ProcessExitFailure, None)), + Err(e) => Err(RuntimeError::new(RuntimeErrorKind::IOError, Some(Box::new(e)))), } } else { Err(RuntimeError::new(RuntimeErrorKind::Instantiate, None))