Coverage Report

Created: 2025-11-16 06:34

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.5.0/src/memchr/naive.rs
Line
Count
Source
1
#![allow(dead_code)]
2
3
0
pub fn memchr(n1: u8, haystack: &[u8]) -> Option<usize> {
4
0
    haystack.iter().position(|&b| b == n1)
5
0
}
6
7
0
pub fn memchr2(n1: u8, n2: u8, haystack: &[u8]) -> Option<usize> {
8
0
    haystack.iter().position(|&b| b == n1 || b == n2)
9
0
}
10
11
0
pub fn memchr3(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option<usize> {
12
0
    haystack.iter().position(|&b| b == n1 || b == n2 || b == n3)
13
0
}
14
15
0
pub fn memrchr(n1: u8, haystack: &[u8]) -> Option<usize> {
16
0
    haystack.iter().rposition(|&b| b == n1)
17
0
}
18
19
0
pub fn memrchr2(n1: u8, n2: u8, haystack: &[u8]) -> Option<usize> {
20
0
    haystack.iter().rposition(|&b| b == n1 || b == n2)
21
0
}
22
23
0
pub fn memrchr3(n1: u8, n2: u8, n3: u8, haystack: &[u8]) -> Option<usize> {
24
0
    haystack.iter().rposition(|&b| b == n1 || b == n2 || b == n3)
25
0
}