Created
May 17, 2020 11:55
-
-
Save DarkFenX/035bbbed04836071f6277b0b5f71e18a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn _read_json(&self, addr: &PhobosAddress) -> PhobosHandlerResult<JsonValue> { | |
let bytes = self | |
._read_file(addr) | |
.map_err(|e| PhobosHandlerError::from_path_err(e, addr.get_full_str(&self.base_path)))?; | |
let data = serde_json::from_slice(&bytes) | |
.map_err(|e| PhobosHandlerError::from_path_err(e, addr.get_full_str(&self.base_path)))?; | |
Ok(data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment