Use unused result when file.write_all() and return error
This commit is contained in:
parent
dc7a212278
commit
c59ed7d2fe
1 changed files with 4 additions and 3 deletions
|
@ -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(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue