-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All the APIs now return errors from the error module in this crate. The only bits left that return boxed errors are: * The custom JSON Schema format validation functions in `src/valid/compiler/mod.rs`, which are required to be boxed errors by the boon crate. * `build.rs` and `main.rs`, where it seems harmless, since those errors are always printed ton the terminal.
- Loading branch information
Showing
9 changed files
with
112 additions
and
131 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
use super::Release; | ||
use crate::error::Error; | ||
use serde_json::Value; | ||
use std::error::Error; | ||
|
||
pub fn from_value(meta: Value) -> Result<Release, Box<dyn Error>> { | ||
match serde_json::from_value(meta) { | ||
Ok(m) => Ok(m), | ||
Err(e) => Err(Box::from(e)), | ||
} | ||
pub fn from_value(meta: Value) -> Result<Release, Error> { | ||
Ok(serde_json::from_value(meta)?) | ||
} |
Oops, something went wrong.