Coverage Report

Created: 2026-08-05 07:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gitoxide/gix-revision/fuzz/fuzz_targets/parse.rs
Line
Count
Source
1
#![no_main]
2
use gix_revision::spec::parse::{delegate, Delegate};
3
use libfuzzer_sys::fuzz_target;
4
5
use bstr::BStr;
6
use gix_error::Exn;
7
8
fuzz_target!(|data: &[u8]| {
9
    drop(gix_revision::spec::parse(data.into(), &mut Noop));
10
});
11
12
struct Noop;
13
14
impl Delegate for Noop {
15
2.53k
    fn done(&mut self) -> Result<(), Exn> {
16
2.53k
        Ok(())
17
2.53k
    }
18
}
19
20
impl delegate::Kind for Noop {
21
1.33k
    fn kind(&mut self, _kind: gix_revision::spec::Kind) -> Result<(), Exn> {
22
1.33k
        Ok(())
23
1.33k
    }
24
}
25
26
impl delegate::Navigate for Noop {
27
7.47k
    fn traverse(&mut self, _kind: delegate::Traversal) -> Result<(), Exn> {
28
7.47k
        Ok(())
29
7.47k
    }
30
31
1.91k
    fn peel_until(&mut self, _kind: delegate::PeelTo<'_>) -> Result<(), Exn> {
32
1.91k
        Ok(())
33
1.91k
    }
34
35
3.00k
    fn find(&mut self, _regex: &BStr, _negated: bool) -> Result<(), Exn> {
36
3.00k
        Ok(())
37
3.00k
    }
38
39
54
    fn index_lookup(&mut self, _path: &BStr, _stage: u8) -> Result<(), Exn> {
40
54
        Ok(())
41
54
    }
42
}
43
44
impl delegate::Revision for Noop {
45
2.58k
    fn find_ref(&mut self, _name: &BStr) -> Result<(), Exn> {
46
2.58k
        Ok(())
47
2.58k
    }
48
49
370
    fn disambiguate_prefix(
50
370
        &mut self,
51
370
        _prefix: gix_hash::Prefix,
52
370
        _hint: Option<delegate::PrefixHint<'_>>,
53
370
    ) -> Result<(), Exn> {
54
370
        Ok(())
55
370
    }
56
57
1.73k
    fn reflog(&mut self, _query: delegate::ReflogLookup) -> Result<(), Exn> {
58
1.73k
        Ok(())
59
1.73k
    }
60
61
79
    fn nth_checked_out_branch(&mut self, _branch_no: usize) -> Result<(), Exn> {
62
79
        Ok(())
63
79
    }
64
65
9
    fn sibling_branch(&mut self, _kind: delegate::SiblingBranch) -> Result<(), Exn> {
66
9
        Ok(())
67
9
    }
68
}