aboutsummaryrefslogtreecommitdiff
path: root/utf8parse/src
diff options
context:
space:
mode:
Diffstat (limited to 'utf8parse/src')
-rw-r--r--utf8parse/src/types.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/utf8parse/src/types.rs b/utf8parse/src/types.rs
index f57a94d..8a52c67 100644
--- a/utf8parse/src/types.rs
+++ b/utf8parse/src/types.rs
@@ -26,9 +26,10 @@ pub enum Action {
/// There is a state for each initial input of the 3 and 4 byte sequences since
/// the following bytes are subject to different conditions than a tail byte.
#[allow(non_camel_case_types)]
-#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
pub enum State {
/// Ground state; expect anything
+ #[default]
Ground = 0,
/// 3 tail bytes
Tail3 = 1,
@@ -46,12 +47,6 @@ pub enum State {
Utf8_4_3_f4 = 7,
}
-impl Default for State {
- fn default() -> State {
- State::Ground
- }
-}
-
impl State {
/// Advance the parser state.
///