Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrmaxmeier committed Jul 16, 2024
1 parent 8e3749f commit 9eb475c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion symbolic-debuginfo/src/dwarf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ impl<'data> DwarfDebugSession<'data> {
let mut res = HashMap::new();
for (i, file) in self.files().enumerate() {
if let Ok(file) = file {
if let Some(_contents) = file.source_str() {
if file.source_str().is_some() {
res.insert(file.abs_path_str(), i);
}
}
Expand Down
6 changes: 2 additions & 4 deletions symbolic-symcache/src/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,8 @@ impl<'data> Iterator for Functions<'data> {
}
}

function.map(|f| {
function.inspect(|_f| {
self.function_idx += 1;
f
})
}
}
Expand Down Expand Up @@ -266,9 +265,8 @@ impl<'data> Iterator for Files<'data> {
type Item = File<'data>;

fn next(&mut self) -> Option<Self::Item> {
self.cache.get_file(self.file_idx).map(|f| {
self.cache.get_file(self.file_idx).inspect(|_f| {
self.file_idx += 1;
f
})
}
}
Expand Down

0 comments on commit 9eb475c

Please sign in to comment.