Skip to content

Commit eeab658

Browse files
So-called zero-cost abstractions
1 parent e174189 commit eeab658

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/symbolize/gimli/parse_running_mmaps_unix.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ impl FromStr for MapsEntry {
9595
// let offset_str = parts.next().ok_or(missing_field)?;
9696
// let dev_str = parts.next().ok_or(missing_field)?;
9797
// let inode_str = parts.next().ok_or(missing_field)?;
98-
let pathname_str = parts.skip(4).next().unwrap_or(""); // pathname may be omitted.
98+
for _ in 0..4 {
99+
let _ = parts.next().ok_or(missing_field)?;
100+
}
101+
let pathname_str = parts.next().unwrap_or(""); // pathname may be omitted.
99102

100103
let hex = |s| usize::from_str_radix(s, 16).map_err(|_| parse_err);
101104
let address = if let Some((start, limit)) = range_str.split_once('-') {

0 commit comments

Comments
 (0)