Skip to content

Commit

Permalink
Merge pull request #708 from epage/cleanup
Browse files Browse the repository at this point in the history
refactor(error): Leverage ErrMode impl
  • Loading branch information
epage authored Jan 22, 2025
2 parents 7cf19d1 + e2fb278 commit 9156d50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/binary/bits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,7 @@ where
Ok(o)
} else {
input.reset(&start);
Err(ErrMode::Backtrack(Error::from_error_kind(
input,
ErrorKind::Literal,
)))
Err(ErrMode::from_error_kind(input, ErrorKind::Literal))
}
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/binary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ where
if PARTIAL && input.is_partial() {
ErrMode::Incomplete(Needed::new(1))
} else {
ErrMode::Backtrack(Error::from_error_kind(input, ErrorKind::Token))
ErrMode::from_error_kind(input, ErrorKind::Token)
}
})
}
Expand Down

0 comments on commit 9156d50

Please sign in to comment.