mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Cleaned code
This commit is contained in:
parent
7bfd9464c9
commit
b66fbce99d
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user