mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
janitor: Simplify x.map(f).flatten() to x.flat_map(f)
This commit is contained in:
parent
4e227684ea
commit
8d799fe78d
1 changed files with 1 additions and 2 deletions
|
@ -1125,14 +1125,13 @@ pub fn instantiate(
|
|||
extra_data.globals = component_type
|
||||
.compiled_globals
|
||||
.iter()
|
||||
.map(|g| {
|
||||
.flat_map(|g| {
|
||||
let (_, instance) = crate::global_component::instantiate(g);
|
||||
g.names()
|
||||
.iter()
|
||||
.map(|name| (crate::normalize_identifier(name).to_string(), instance.clone()))
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
.flatten()
|
||||
.collect();
|
||||
|
||||
extra_data.embedded_file_resources = component_type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue