mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
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:
parent
589f0d7018
commit
a2b27012a5
1 changed files with 2 additions and 3 deletions
|
@ -151,7 +151,7 @@ impl PageStyleActor {
|
||||||
)
|
)
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|node| {
|
.flat_map(|node| {
|
||||||
let inherited = (node.actor != target).then(|| node.actor.clone());
|
let inherited = (node.actor != target).then(|| node.actor.clone());
|
||||||
let node_actor = registry.find::<NodeActor>(&node.actor);
|
let node_actor = registry.find::<NodeActor>(&node.actor);
|
||||||
|
|
||||||
|
@ -207,9 +207,8 @@ impl PageStyleActor {
|
||||||
inherited: inherited.clone(),
|
inherited: inherited.clone(),
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
Some(entries)
|
entries
|
||||||
})
|
})
|
||||||
.flatten()
|
|
||||||
.collect();
|
.collect();
|
||||||
let msg = GetAppliedReply {
|
let msg = GetAppliedReply {
|
||||||
entries,
|
entries,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue