Use return value: Check whether read succeeded
This commit is contained in:
parent
6ee54dfb78
commit
3284e78d73
1 changed files with 2 additions and 1 deletions
|
@ -217,7 +217,8 @@ impl Store {
|
||||||
|
|
||||||
FSFile::open(&path).map(|mut file| {
|
FSFile::open(&path).map(|mut file| {
|
||||||
file.read_to_string(&mut string)
|
file.read_to_string(&mut string)
|
||||||
.map_err(|e| error!("Failed reading file: '{}'", path));
|
.map_err(|e| error!("Failed reading file: '{}'", path))
|
||||||
|
.is_ok();
|
||||||
});
|
});
|
||||||
|
|
||||||
parser.read(string).map(|(header, data)| {
|
parser.read(string).map(|(header, data)| {
|
||||||
|
|
Loading…
Reference in a new issue