Make result used by try!()ing
This commit is contained in:
parent
d523c432c3
commit
cdad750e02
1 changed files with 1 additions and 2 deletions
|
@ -41,8 +41,7 @@ pub fn edit_in_tmpfile(rt: &Runtime, s: &mut String) -> EditResult<()> {
|
|||
let file_path = file.path();
|
||||
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());
|
||||
|
||||
if let Some(mut editor) = rt.editor() {
|
||||
|
|
Loading…
Reference in a new issue