aboutsummaryrefslogtreecommitdiff
path: root/utf8parse/src
diff options
context:
space:
mode:
authorAnhad Singh <62820092+Andy-Python-Programmer@users.noreply.github.com>2023-05-15 08:54:30 +1000
committerGitHub <noreply@github.com>2023-05-14 22:54:30 +0000
commit257b925513c8bf47895dac90d8ccb815bec88492 (patch)
tree3f0f8cb7ac9817d857dd1be3a43e300b3a4c9e7d /utf8parse/src
parentaba7d319b621609ab4244d1fe25187a319b04664 (diff)
downloadr-alacritty-vte-257b925513c8bf47895dac90d8ccb815bec88492.tar.gz
r-alacritty-vte-257b925513c8bf47895dac90d8ccb815bec88492.tar.bz2
r-alacritty-vte-257b925513c8bf47895dac90d8ccb815bec88492.zip
Migrate `ansi` from `alacritty_terminal`
Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com> Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com> Co-authored-by: Nicholas Sim <nsim@posteo.net> Co-authored-by: Christian Duerr <contact@christianduerr.com>
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.
///