MCPcopy Index your code
hub / github.com/encounter/objdiff / find_prev_symbol

Function find_prev_symbol

objdiff-gui/src/views/symbol_diff.rs:664–674  ·  view source on GitHub ↗
(section_display: &[SectionDisplay], current: usize)

Source from the content-addressed store, hash-verified

662}
663
664fn find_prev_symbol(section_display: &[SectionDisplay], current: usize) -> Option<usize> {
665 section_display
666 .iter()
667 .flat_map(|s| s.symbols.iter())
668 .rev()
669 .skip_while(|s| s.symbol != current)
670 .nth(1)
671 .map(|s| s.symbol)
672 // Wrap around to the last symbol if we're at the beginning of the list
673 .or_else(|| find_last_symbol(section_display))
674}
675
676fn find_next_symbol(section_display: &[SectionDisplay], current: usize) -> Option<usize> {
677 section_display

Callers 1

symbol_list_uiFunction · 0.85

Calls 1

find_last_symbolFunction · 0.85

Tested by

no test coverage detected