Skip to content

Commit 37c900a

Browse files
committed
cleaner error Display
1 parent 258f961 commit 37c900a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shared.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ pub enum DecodeError {
8282
impl std::fmt::Display for DecodeError {
8383
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
8484
match self {
85-
DecodeError::InvalidChar { char, index } => {
85+
Self::InvalidChar { char, index } => {
8686
write!(f, "Invalid char of '{char}' at position {index}")
8787
}
88-
DecodeError::InvalidLength { length } => {
88+
Self::InvalidLength { length } => {
8989
write!(f, "Invalid length of {length}")
90-
} // DecodeError::InvalidBits { byte, index } => {
90+
} // Self::InvalidBits { byte, index } => {
9191
// write!(f, "Invalid bits in {byte} at position {index}")
9292
// }
9393
}

0 commit comments

Comments
 (0)