summaryrefslogtreecommitdiffstats
path: root/vendor/bstr/src/unicode/fsm/whitespace_anchored_fwd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/bstr/src/unicode/fsm/whitespace_anchored_fwd.rs')
-rw-r--r--vendor/bstr/src/unicode/fsm/whitespace_anchored_fwd.rs55
1 files changed, 19 insertions, 36 deletions
diff --git a/vendor/bstr/src/unicode/fsm/whitespace_anchored_fwd.rs b/vendor/bstr/src/unicode/fsm/whitespace_anchored_fwd.rs
index 0780412ae..193deb0ca 100644
--- a/vendor/bstr/src/unicode/fsm/whitespace_anchored_fwd.rs
+++ b/vendor/bstr/src/unicode/fsm/whitespace_anchored_fwd.rs
@@ -1,41 +1,24 @@
// DO NOT EDIT THIS FILE. IT WAS AUTOMATICALLY GENERATED BY:
//
-// ucd-generate dfa --name WHITESPACE_ANCHORED_FWD --anchored --classes --premultiply --minimize --state-size 1 src/unicode/fsm/ \s+
+// regex-cli generate serialize dense dfa --minimize --start-kind anchored --shrink --rustfmt --safe WHITESPACE_ANCHORED_FWD src/unicode/fsm/ \s+
//
-// ucd-generate 0.2.12 is available on crates.io.
+// regex-cli 0.0.1 is available on crates.io.
-#[cfg(target_endian = "big")]
-pub static WHITESPACE_ANCHORED_FWD: ::once_cell::sync::Lazy<
- ::regex_automata::DenseDFA<&'static [u8], u8>,
-> = ::once_cell::sync::Lazy::new(|| {
- #[repr(C)]
- struct Aligned<B: ?Sized> {
- _align: [u8; 0],
- bytes: B,
- }
+use regex_automata::{
+ dfa::dense::DFA,
+ util::{lazy::Lazy, wire::AlignAs},
+};
- static ALIGNED: &'static Aligned<[u8]> = &Aligned {
- _align: [],
- bytes: *include_bytes!("whitespace_anchored_fwd.bigendian.dfa"),
- };
-
- unsafe { ::regex_automata::DenseDFA::from_bytes(&ALIGNED.bytes) }
-});
-
-#[cfg(target_endian = "little")]
-pub static WHITESPACE_ANCHORED_FWD: ::once_cell::sync::Lazy<
- ::regex_automata::DenseDFA<&'static [u8], u8>,
-> = ::once_cell::sync::Lazy::new(|| {
- #[repr(C)]
- struct Aligned<B: ?Sized> {
- _align: [u8; 0],
- bytes: B,
- }
-
- static ALIGNED: &'static Aligned<[u8]> = &Aligned {
- _align: [],
- bytes: *include_bytes!("whitespace_anchored_fwd.littleendian.dfa"),
- };
-
- unsafe { ::regex_automata::DenseDFA::from_bytes(&ALIGNED.bytes) }
-});
+pub static WHITESPACE_ANCHORED_FWD: Lazy<DFA<&'static [u32]>> =
+ Lazy::new(|| {
+ static ALIGNED: &AlignAs<[u8], u32> = &AlignAs {
+ _align: [],
+ #[cfg(target_endian = "big")]
+ bytes: *include_bytes!("whitespace_anchored_fwd.bigendian.dfa"),
+ #[cfg(target_endian = "little")]
+ bytes: *include_bytes!("whitespace_anchored_fwd.littleendian.dfa"),
+ };
+ let (dfa, _) = DFA::from_bytes(&ALIGNED.bytes)
+ .expect("serialized DFA should be valid");
+ dfa
+ });