Remove identity map calls (#10848)

Removes calls to `Iterator::map` that don't do any work.
This commit is contained in:
Federico Rinaldi 2023-12-04 21:44:53 +01:00 committed by GitHub
parent 4d42713e77
commit c9368734d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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, "}}")
}
}
@ -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, "}}")
}
}