Use unused result when file.write_all() and return error

This commit is contained in:
Matthias Beyer 2016-03-21 19:45:09 +01:00
parent dc7a212278
commit c59ed7d2fe

View file

@ -90,10 +90,11 @@ impl StoreEntry {
let file = try!(self.file.create_file()); let file = try!(self.file.create_file());
assert_eq!(self.id, entry.location); assert_eq!(self.id, entry.location);
file.write_all(entry.to_str().as_bytes()); file.write_all(entry.to_str().as_bytes())
.map_err(|e| StoreError::new(StoreErrorKind::FileError, Some(Box::new(e))))
} else {
Ok(())
} }
Ok(())
} }
} }