daachorse 2.1.1

Daachorse: Double-Array Aho-Corasick
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub trait FromU32 {
    fn from_u32(src: u32) -> Self;
}

#[cfg(any(target_pointer_width = "32", target_pointer_width = "64"))]
impl FromU32 for usize {
    #[inline(always)]
    fn from_u32(src: u32) -> Self {
        // Since the pointer width is guaranteed to be 32 or 64, the following process always
        // succeeds.
        unsafe { Self::try_from(src).unwrap_unchecked() }
    }
}