Use for-loop instead of Iterator::for_each
This commit is contained in:
parent
40445c450c
commit
ab3be8aca3
1 changed files with 3 additions and 3 deletions
|
@ -79,7 +79,7 @@ impl LineDemo {
|
||||||
ComboBox::from_label("Line style")
|
ComboBox::from_label("Line style")
|
||||||
.selected_text(line_style.to_string())
|
.selected_text(line_style.to_string())
|
||||||
.show_ui(ui, |ui| {
|
.show_ui(ui, |ui| {
|
||||||
[
|
for style in [
|
||||||
LineStyle::Solid,
|
LineStyle::Solid,
|
||||||
LineStyle::dashed_dense(),
|
LineStyle::dashed_dense(),
|
||||||
LineStyle::dashed_loose(),
|
LineStyle::dashed_loose(),
|
||||||
|
@ -87,9 +87,9 @@ impl LineDemo {
|
||||||
LineStyle::dotted_loose(),
|
LineStyle::dotted_loose(),
|
||||||
]
|
]
|
||||||
.iter()
|
.iter()
|
||||||
.for_each(|style| {
|
{
|
||||||
ui.selectable_value(line_style, *style, style.to_string());
|
ui.selectable_value(line_style, *style, style.to_string());
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue