Function
find_section
(
obj: Option<&Object>,
name: &str,
section_kind: SectionKind,
matches: &[SectionMatch],
)
Source from the content-addressed store, hash-verified
| 797 | } |
| 798 | |
| 799 | fn 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)] |
| 811 | pub enum DiffSide { |
Tested by
no test coverage detected