mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Simplify code a bit
... as suggested by @tronical Co-authored-by: Simon Hausmann <hausmann@gmail.com>
This commit is contained in:
parent
e3908cfce6
commit
0ee0eaf25e
1 changed files with 3 additions and 4 deletions
|
@ -51,10 +51,9 @@ mod builtin_library {
|
|||
pub(crate) fn styles() -> Vec<&'static str> {
|
||||
widget_library()
|
||||
.iter()
|
||||
.filter_map(|d| {
|
||||
let style = d.0;
|
||||
if d.1.iter().any(|f| f.path == "sixtyfps_widgets.60") {
|
||||
Some(style)
|
||||
.filter_map(|(style, directory)| {
|
||||
if directory.iter().any(|f| f.path == "sixtyfps_widgets.60") {
|
||||
Some(*style)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue