Skip to content

Commit

Permalink
Merge pull request #46 from samheuck/echartserror-impl-std-error
Browse files Browse the repository at this point in the history
implements std Error and Display traits for EchartsError
  • Loading branch information
yuankunzhang authored Feb 26, 2024
2 parents 974f8d6 + 6011116 commit e9ecbf2
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 e9ecbf2

Please sign in to comment.