We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eaf45f commit 8c6daefCopy full SHA for 8c6daef
src/writer.rs
@@ -8,12 +8,14 @@ use alloc::{fmt, vec};
8
#[derive(PartialEq, Eq, Debug)]
9
pub enum WriteError {
10
AllocationError,
11
+ CustomError(String),
12
}
13
14
impl fmt::Display for WriteError {
15
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
16
match self {
17
WriteError::AllocationError => write!(f, "allocation error"),
18
+ WriteError::CustomError(s) => write!(f, "{s}"),
19
20
21
0 commit comments