mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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()
|
||||
.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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue