From 3140cdc4babcefc444f1c1d30eb0f5f4ed1df054 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 18 Oct 2021 16:02:30 +0700 Subject: Wire up styling to `Button` in `iced_native` --- style/src/button.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'style') diff --git a/style/src/button.rs b/style/src/button.rs index 2281e32f..608f344b 100644 --- a/style/src/button.rs +++ b/style/src/button.rs @@ -80,17 +80,8 @@ impl StyleSheet for Default { } } -impl std::default::Default for Box { +impl std::default::Default for &'static dyn StyleSheet { fn default() -> Self { - Box::new(Default) - } -} - -impl From for Box -where - T: 'static + StyleSheet, -{ - fn from(style: T) -> Self { - Box::new(style) + &Default } } -- cgit