Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Jan 6, 2025
1 parent 9240bd0 commit cd4254a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/symbolize/gimli/parse_running_mmaps_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ pub(super) struct MapsEntry {
pub(super) fn parse_maps() -> Result<Vec<MapsEntry>, &'static str> {
let failed_io_err = "couldn't read /proc/self/maps";
let mut v = Vec::new();
let mut proc_self_maps =
File::open("/proc/self/maps").map_err(|_| failed_io_err)?;
let mut proc_self_maps = File::open("/proc/self/maps").map_err(|_| failed_io_err)?;
let mut buf = String::new();
let _bytes_read = proc_self_maps
.read_to_string(&mut buf)
Expand Down Expand Up @@ -101,8 +100,7 @@ impl FromStr for MapsEntry {
fn from_str(s: &str) -> Result<Self, Self::Err> {
let missing_field = "failed to find all map fields";
let parse_err = "failed to parse all map fields";
let mut parts = s
.split_ascii_whitespace();
let mut parts = s.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 cd4254a

Please sign in to comment.