Skip to content

Commit

Permalink
Remove identity map calls (#10848)
Browse files Browse the repository at this point in the history
Removes calls to `Iterator::map` that don't do any work.
  • Loading branch information
Nilirad committed Dec 4, 2023
1 parent 4d42713 commit c936873
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ pub struct App {
impl Debug for App {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "App {{ sub_apps: ")?;
f.debug_map()
.entries(self.sub_apps.iter().map(|(k, v)| (k, v)))
.finish()?;
f.debug_map().entries(self.sub_apps.iter()).finish()?;
write!(f, "}}")
}
}
Expand Down Expand Up @@ -176,9 +174,7 @@ impl SubApp {
impl Debug for SubApp {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SubApp {{ app: ")?;
f.debug_map()
.entries(self.app.sub_apps.iter().map(|(k, v)| (k, v)))
.finish()?;
f.debug_map().entries(self.app.sub_apps.iter()).finish()?;
write!(f, "}}")
}
}
Expand Down

0 comments on commit c936873

Please sign in to comment.