Make result used by try!()ing

This commit is contained in:
Matthias Beyer 2016-03-25 16:19:21 +01:00
parent d523c432c3
commit cdad750e02
1 changed files with 1 additions and 2 deletions

View File

@ -41,8 +41,7 @@ pub fn edit_in_tmpfile(rt: &Runtime, s: &mut String) -> EditResult<()> {
let file_path = file.path(); let file_path = file.path();
let mut file = try!(file.reopen()); let mut file = try!(file.reopen());
file.write_all(&s.clone().into_bytes()[..]); try!(file.write_all(&s.clone().into_bytes()[..]));
try!(file.sync_data()); try!(file.sync_data());
if let Some(mut editor) = rt.editor() { if let Some(mut editor) = rt.editor() {