Use return value: Check whether read succeeded

This commit is contained in:
Matthias Beyer 2016-01-05 16:11:59 +01:00
parent 6ee54dfb78
commit 3284e78d73

View file

@ -217,7 +217,8 @@ impl Store {
FSFile::open(&path).map(|mut file| {
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)| {