summaryrefslogtreecommitdiffstats
path: root/examples/layout
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-14 03:54:40 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-14 03:54:40 +0100
commitf53cfb8efa81563b76a4b585ae8cd856dd1eb149 (patch)
tree2254ab7323a65ef0e71b63fa50a44b89c1b4041b /examples/layout
parent52e207b89bb79dba210c581b790f794e6e0c94e8 (diff)
downloadiced-f53cfb8efa81563b76a4b585ae8cd856dd1eb149.tar.gz
iced-f53cfb8efa81563b76a4b585ae8cd856dd1eb149.tar.bz2
iced-f53cfb8efa81563b76a4b585ae8cd856dd1eb149.zip
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);