We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17572d4 commit dc0b0deCopy full SHA for dc0b0de
src/raw/generic.rs
@@ -27,11 +27,7 @@ pub const BITMASK_MASK: BitMaskWord = 0x8080_8080_8080_8080_u64 as GroupWord;
27
/// Helper function to replicate a byte across a `GroupWord`.
28
#[inline]
29
fn repeat(byte: u8) -> GroupWord {
30
- let repeat = GroupWord::from(byte);
31
- let repeat = repeat | repeat.wrapping_shl(8);
32
- let repeat = repeat | repeat.wrapping_shl(16);
33
- // This last line is a no-op with a 32-bit GroupWord
34
- repeat | repeat.wrapping_shl(32)
+ GroupWord::from_ne_bytes([byte; Group::WIDTH])
35
}
36
37
/// Abstraction over a group of control bytes which can be scanned in
0 commit comments