From a990de90fe41456a23e58bd087d2f107d321f3a1 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 19 Jul 2024 16:37:58 +0400 Subject: Deleted vendor folder --- vendor/anstyle-parse/src/state/mod.rs | 41 ----------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 vendor/anstyle-parse/src/state/mod.rs (limited to 'vendor/anstyle-parse/src/state/mod.rs') diff --git a/vendor/anstyle-parse/src/state/mod.rs b/vendor/anstyle-parse/src/state/mod.rs deleted file mode 100644 index 9194205..0000000 --- a/vendor/anstyle-parse/src/state/mod.rs +++ /dev/null @@ -1,41 +0,0 @@ -#[cfg(test)] -mod codegen; -mod definitions; -mod table; - -#[cfg(test)] -pub(crate) use definitions::pack; -pub(crate) use definitions::unpack; -pub use definitions::Action; -pub use definitions::State; - -/// Transition to next [`State`] -/// -/// Note: This does not directly support UTF-8. -/// - If the data is validated as UTF-8 (e.g. `str`) or single-byte C1 control codes are -/// unsupported, then treat [`Action::BeginUtf8`] and [`Action::Execute`] for UTF-8 continuations -/// as [`Action::Print`]. -/// - If the data is not validated, then a UTF-8 state machine will need to be implemented on top, -/// starting with [`Action::BeginUtf8`]. -/// -/// Note: When [`State::Anywhere`] is returned, revert back to the prior state. -#[inline] -pub const fn state_change(state: State, byte: u8) -> (State, Action) { - // Handle state changes in the anywhere state before evaluating changes - // for current state. - let mut change = state_change_(State::Anywhere, byte); - if change == 0 { - change = state_change_(state, byte); - } - - // Unpack into a state and action - unpack(change) -} - -#[inline] -const fn state_change_(state: State, byte: u8) -> u8 { - let state_idx = state as usize; - let byte_idx = byte as usize; - - table::STATE_CHANGES[state_idx][byte_idx] -} -- cgit v1.2.3