clippy: Use flat_map instead of map in components/devtools (#33724)

* clippy: fix rewrite filter_map with map warning in `components/devtools/actors/inspector/page_style.rs`

Signed-off-by: Antony Nyagah <tony.m.nyagah@gmail.com>

* clippy: Use `flat_map` instead `map` in `components/devtools`

Signed-off-by: Antony Nyagah <tony.m.nyagah@gmail.com>

---------

Signed-off-by: Antony Nyagah <tony.m.nyagah@gmail.com>
This commit is contained in:
Antony Nyagah 2024-10-09 07:33:36 +03:00 committed by GitHub
parent 589f0d7018
commit a2b27012a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,7 +151,7 @@ impl PageStyleActor {
)
.unwrap_or_default()
.into_iter()
.filter_map(|node| {
.flat_map(|node| {
let inherited = (node.actor != target).then(|| node.actor.clone());
let node_actor = registry.find::<NodeActor>(&node.actor);
@ -207,9 +207,8 @@ impl PageStyleActor {
inherited: inherited.clone(),
})
});
Some(entries)
entries
})
.flatten()
.collect();
let msg = GetAppliedReply {
entries,