diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/anstyle-parse/src | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/anstyle-parse/src')
-rw-r--r-- | vendor/anstyle-parse/src/state/definitions.rs | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/vendor/anstyle-parse/src/state/definitions.rs b/vendor/anstyle-parse/src/state/definitions.rs index a1b4c2cc8..c4e767358 100644 --- a/vendor/anstyle-parse/src/state/definitions.rs +++ b/vendor/anstyle-parse/src/state/definitions.rs @@ -2,6 +2,7 @@ use core::mem; #[derive(Debug, Copy, Clone, PartialEq, Eq)] #[repr(u8)] +#[derive(Default)] pub enum State { Anywhere = 0, CsiEntry = 1, @@ -15,19 +16,13 @@ pub enum State { DcsPassthrough = 9, Escape = 10, EscapeIntermediate = 11, + #[default] Ground = 12, OscString = 13, SosPmApcString = 14, Utf8 = 15, } -impl Default for State { - #[inline] - fn default() -> State { - State::Ground - } -} - impl TryFrom<u8> for State { type Error = u8; @@ -58,7 +53,9 @@ const STATES: [State; 16] = [ #[derive(Debug, Clone, Copy, PartialEq, Eq)] #[repr(u8)] +#[derive(Default)] pub enum Action { + #[default] Nop = 0, Clear = 1, Collect = 2, @@ -77,13 +74,6 @@ pub enum Action { BeginUtf8 = 15, } -impl Default for Action { - #[inline] - fn default() -> Action { - Action::Nop - } -} - impl TryFrom<u8> for Action { type Error = u8; |