Skip to content

Commit

Permalink
Use split_ascii_whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Jul 6, 2023
1 parent 9df8ebb commit cb775f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/symbolize/gimli/parse_running_mmaps_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ impl FromStr for MapsEntry {
let missing_field = "failed to find all map fields";
let parse_err = "failed to parse all map fields";
let mut parts = s
.split(' ') // space-separated fields
.filter(|s| s.len() > 0); // multiple spaces implies empty strings that need to be skipped.
.split_ascii_whitespace();
let range_str = parts.next().ok_or(missing_field)?;
let perms_str = parts.next().ok_or(missing_field)?;
let offset_str = parts.next().ok_or(missing_field)?;
Expand Down

0 comments on commit cb775f1

Please sign in to comment.