pub(crate) fn find(haystack: &[u8], needle: &[u8]) -> Option<usize> {
    let end = haystack.len().checked_sub(needle.len()).map_or(0, |i| i + 1);
    for i in 0..end {
        if needle == &haystack[i..i + needle.len()] {
            return Some(i);
        }
    }
    None
}
Naively search forwards for the given needle in the given haystack.
src/tests/substring/naive.rs