summaryrefslogtreecommitdiffstats
path: root/examples/styling
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/styling
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/styling')
-rw-r--r--examples/styling/src/main.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs
index cf2dcb8a..c26215b6 100644
--- a/examples/styling/src/main.rs
+++ b/examples/styling/src/main.rs
@@ -55,12 +55,8 @@ impl Sandbox for Styling {
fn view(&self) -> Element<Message> {
let choose_theme = column![
text("Theme:"),
- pick_list(
- Theme::ALL,
- Some(self.theme.clone()),
- Message::ThemeChanged
- )
- .width(Length::Fill),
+ pick_list(Theme::ALL, Some(&self.theme), Message::ThemeChanged)
+ .width(Length::Fill),
]
.spacing(10);