Cleaned code

This commit is contained in:
scorpion9979 2019-06-04 07:22:11 +03:00 committed by Forest Anderson
parent 7bfd9464c9
commit b66fbce99d

View File

@ -109,11 +109,7 @@ impl Asset for DotVoxData {
impl Asset for Value {
fn load(specifier: &str) -> Result<Self, Error> {
let file =
File::open(specifier).expect(&format!("opening {} in read-only mode", specifier));
let json: serde_json::Value = serde_json::from_reader(file)
.expect(&format!("reading json contents from {}", specifier));
Ok(json)
Ok(serde_json::from_reader(File::open(specifier)?).unwrap())
}
}