From 3d99da805dd42a062aa66a3bdc43c7cf82fa4fbe Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 9 Jul 2024 00:27:59 +0200 Subject: Implement `Default` for `combo_box::State` --- widget/src/combo_box.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'widget/src/combo_box.rs') 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 Default for State +where + T: Display + Clone, +{ + fn default() -> Self { + Self::new(Vec::new()) + } +} + impl Filtered where T: Clone, -- cgit