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

Function find_next_symbol

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

Source from the content-addressed store, hash-verified

674}
675
676fn find_next_symbol(section_display: &[SectionDisplay], current: usize) -> Option<usize> {
677 section_display
678 .iter()
679 .flat_map(|s| s.symbols.iter())
680 .skip_while(|s| s.symbol != current)
681 .nth(1)
682 .map(|s| s.symbol)
683 // Wrap around to the first symbol if we're at the end of the list
684 .or_else(|| find_first_symbol(section_display))
685}
686
687fn find_first_symbol(section_display: &[SectionDisplay]) -> Option<usize> {
688 section_display.iter().flat_map(|s| s.symbols.iter()).next().map(|s| s.symbol)

Callers 1

symbol_list_uiFunction · 0.85

Calls 1

find_first_symbolFunction · 0.85

Tested by

no test coverage detected