diff options
Diffstat (limited to 'utf8parse/src/types.rs')
-rw-r--r-- | utf8parse/src/types.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/utf8parse/src/types.rs b/utf8parse/src/types.rs index a5b9436..93607fb 100644 --- a/utf8parse/src/types.rs +++ b/utf8parse/src/types.rs @@ -27,6 +27,12 @@ pub enum State { Utf8_4_3_f4 = 7, } +impl Default for State { + fn default() -> State { + State::Ground + } +} + /// Action to take when receiving a byte #[allow(dead_code)] #[derive(Debug, Copy, Clone)] @@ -70,7 +76,6 @@ pub unsafe fn unpack(val: u8) -> (State, Action) { ( // State is stored in bottom 4 bits mem::transmute(val & 0x0f), - // Action is stored in top 4 bits mem::transmute(val >> 4), ) |