pub(crate) fn new(ninfo: &NeedleInfo, needle: &[u8]) -> Option<Forward> {
        let (rare1i, rare2i) = ninfo.rarebytes.as_rare_ordered_u8();
        // If the needle is too short or too long, give up. Also, give up
        // if the rare bytes detected are at the same position. (It likely
        // suggests a degenerate case, although it should technically not be
        // possible.)
        if needle.len() < MIN_NEEDLE_LEN
            || needle.len() > MAX_NEEDLE_LEN
            || rare1i == rare2i
        {
            return None;
        }
        Some(Forward { rare1i, rare2i })
    }
/// Create a new "generic simd" forward searcher. If one could not be
/// created from the given inputs, then None is returned.
Create a new "generic simd" forward searcher. If one could not be
created from the given inputs, then None is returned.
Create a new " generic simd " forward searcher . If one could not be created from the given inputs then None is returned .
pub(crate) fn new(ninfo: &NeedleInfo, needle: &[u8]) -> Option<Forward> {
        let (rare1i, rare2i) = ninfo.rarebytes.as_rare_ordered_u8();
        // If the needle is too short or too long, give up. Also, give up
        // if the rare bytes detected are at the same position. (It likely
        // suggests a degenerate case, although it should technically not be
        // possible.)
        if needle.len() < MIN_NEEDLE_LEN
            || needle.len() > MAX_NEEDLE_LEN
            || rare1i == rare2i
        {
            return None;
        }
        Some(Forward { rare1i, rare2i })
    }
pub ( crate ) fn new ( ninfo : & NeedleInfo , needle : & [ u8 ] ) -> Option < Forward > { let ( rare1i , rare2i ) = ninfo . rarebytes . as_rare_ordered_u8 ( ) ; // If the needle is too short or too long, give up. Also, give up // if the rare bytes detected are at the same position. (It likely // suggests a degenerate case, although it should technically not be // possible.) if needle . len ( ) < MIN_NEEDLE_LEN || needle . len ( ) > MAX_NEEDLE_LEN || rare1i == rare2i { return None ; } Some ( Forward { rare1i , rare2i } ) }
Create a new "generic simd" forward searcher.
Create a new " generic simd " forward searcher .
ninfo
&NeedleInfo
needle
&[u8]
ninfo
&NeedleInfo
needle
&[u8]