(sections: &mut [Section], base_address: u64, lines: &[i32])
| 157 | } |
| 158 | |
| 159 | fn assign_lines(sections: &mut [Section], base_address: u64, lines: &[i32]) { |
| 160 | let mut address = base_address; |
| 161 | for &line in lines { |
| 162 | if line >= 0 |
| 163 | && let Some(section) = find_code_section(sections, address) |
| 164 | { |
| 165 | section.line_info.insert(address, line as u32); |
| 166 | } |
| 167 | address = address.wrapping_add(4); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | fn find_code_section(sections: &mut [Section], address: u64) -> Option<&mut Section> { |
| 172 | sections.iter_mut().find(|section| { |
no test coverage detected