diff options
Diffstat (limited to 'utf8parse')
-rw-r--r-- | utf8parse/src/lib.rs | 1 | ||||
-rw-r--r-- | utf8parse/src/types.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/utf8parse/src/lib.rs b/utf8parse/src/lib.rs index c092647..6168e2e 100644 --- a/utf8parse/src/lib.rs +++ b/utf8parse/src/lib.rs @@ -3,6 +3,7 @@ //! This module implements a table-driven UTF-8 parser which should //! theoretically contain the minimal number of branches (1). The only branch is //! on the `Action` returned from unpacking a transition. +#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use, clippy::wrong_pub_self_convention)] #![cfg_attr(all(feature = "nightly", test), feature(test))] #![no_std] diff --git a/utf8parse/src/types.rs b/utf8parse/src/types.rs index 5a70b3c..77a79cc 100644 --- a/utf8parse/src/types.rs +++ b/utf8parse/src/types.rs @@ -58,7 +58,7 @@ impl State { /// This takes the current state and input byte into consideration, to determine the next state /// and any action that should be taken. #[inline] - pub fn advance(&self, byte: u8) -> (State, Action) { + pub fn advance(self, byte: u8) -> (State, Action) { match self { State::Ground => match byte { 0x00..=0x7f => (State::Ground, Action::EmitByte), |