Skip to content

Commit

Permalink
implements std Error and Display traits for EchartsError
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Heuck <[email protected]>
  • Loading branch information
samheuck committed Feb 15, 2024
1 parent 974f8d6 commit 6011116
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions charming/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,3 +524,10 @@ pub enum EchartsError {
JsRuntimeError(String),
WasmError(String),
}

impl std::error::Error for EchartsError {}
impl std::fmt::Display for EchartsError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", self)
}
}

0 comments on commit 6011116

Please sign in to comment.