summaryrefslogtreecommitdiffstats
path: root/examples/layout
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-02-14 04:09:33 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-14 04:09:33 +0100
commit75b19646d3d17b9b44bb495e239cbbc2d139c0e9 (patch)
treebb6ef840b8b81367c83e1bc97150ae21e88d65e5 /examples/layout
parent52e207b89bb79dba210c581b790f794e6e0c94e8 (diff)
parent06973d31c6b7655f6f6fb0dfb17e621052b810e6 (diff)
downloadiced-75b19646d3d17b9b44bb495e239cbbc2d139c0e9.tar.gz
iced-75b19646d3d17b9b44bb495e239cbbc2d139c0e9.tar.bz2
iced-75b19646d3d17b9b44bb495e239cbbc2d139c0e9.zip
Merge pull request #2251 from iced-rs/borrow-pick-list-values
Use `Borrow` for both `options` and `selected` in `PickList`
Diffstat (limited to 'examples/layout')
-rw-r--r--examples/layout/src/main.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/layout/src/main.rs b/examples/layout/src/main.rs
index b626c70d..f41c9986 100644
--- a/examples/layout/src/main.rs
+++ b/examples/layout/src/main.rs
@@ -88,11 +88,7 @@ impl Application for Layout {
horizontal_space(Length::Fill),
checkbox("Explain", self.explain)
.on_toggle(Message::ExplainToggled),
- pick_list(
- Theme::ALL,
- Some(self.theme.clone()),
- Message::ThemeSelected
- ),
+ pick_list(Theme::ALL, Some(&self.theme), Message::ThemeSelected),
]
.spacing(20)
.align_items(Alignment::Center);