-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Remove the thiserror crate and replace with the same code that would be generated. This change was authored by @overcat in #64, and has been extracted to commit separately. Co-authored-by: Jun Luo <[email protected]>
- Loading branch information
1 parent
63a1d5e
commit 00c7df7
Showing
3 changed files
with
23 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
#[derive(thiserror::Error, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)] | ||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug)] | ||
pub enum DecodeError { | ||
// TODO: Add meaningful errors for each problem that can occur. | ||
#[error("the strkey is invalid")] | ||
Invalid, | ||
} | ||
|
||
impl core::fmt::Display for DecodeError { | ||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
match self { | ||
DecodeError::Invalid {} => f.write_str("the strkey is invalid"), | ||
} | ||
} | ||
} | ||
|
||
impl core::error::Error for DecodeError {} |