summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-09 00:27:59 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-09 00:27:59 +0200
commit3d99da805dd42a062aa66a3bdc43c7cf82fa4fbe (patch)
treef90306bb7544e40a0f0a50520467a3e0d73f68d6
parentacf6daff46f8a0363a46f1957f481fa6625c7790 (diff)
downloadiced-3d99da805dd42a062aa66a3bdc43c7cf82fa4fbe.tar.gz
iced-3d99da805dd42a062aa66a3bdc43c7cf82fa4fbe.tar.bz2
iced-3d99da805dd42a062aa66a3bdc43c7cf82fa4fbe.zip
Implement `Default` for `combo_box::State`
-rw-r--r--widget/src/combo_box.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/widget/src/combo_box.rs b/widget/src/combo_box.rs
index 253850df..0a4624cb 100644
--- a/widget/src/combo_box.rs
+++ b/widget/src/combo_box.rs
@@ -280,6 +280,15 @@ where
}
}
+impl<T> Default for State<T>
+where
+ T: Display + Clone,
+{
+ fn default() -> Self {
+ Self::new(Vec::new())
+ }
+}
+
impl<T> Filtered<T>
where
T: Clone,