MCPcopy Create free account
hub / github.com/encounter/objdiff / find_section

Function find_section

objdiff-core/src/diff/mod.rs:799–808  ·  view source on GitHub ↗
(
    obj: Option<&Object>,
    name: &str,
    section_kind: SectionKind,
    matches: &[SectionMatch],
)

Source from the content-addressed store, hash-verified

797}
798
799fn find_section(
800 obj: Option<&Object>,
801 name: &str,
802 section_kind: SectionKind,
803 matches: &[SectionMatch],
804) -> Option<usize> {
805 obj?.sections.iter().enumerate().position(|(i, s)| {
806 s.kind == section_kind && s.name == name && !matches.iter().any(|m| m.right == Some(i))
807 })
808}
809
810#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
811pub enum DiffSide {

Callers 1

matching_sectionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected