Skip to content

Commit

Permalink
remove unused conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Jul 25, 2023
1 parent a479ecd commit 6002348
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,6 @@ pub enum Error<T> {
PathAbsent,
}

impl<T> From<Error<T>> for u8 {
fn from(err: Error<T>) -> Self {
match err {
Error::PathNotFound => 1,
Error::PathTooLong => 2,
Error::PathTooShort => 3,
Error::PostDeserialization(_) => 4,
Error::SerDe(_) => 5,
Error::BadIndex => 6,
Error::PathAbsent => 8,
}
}
}

impl<T> From<T> for Error<T> {
fn from(err: T) -> Self {
Error::SerDe(err)
Expand Down

0 comments on commit 6002348

Please sign in to comment.