From d61cb58d92b6fcd520f665deb093f3747ffd5e5c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 18 Oct 2021 15:36:32 +0700 Subject: Wire up `container` styling to `iced_native` --- style/src/container.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'style') diff --git a/style/src/container.rs b/style/src/container.rs index 1ce6a7ca..6b0a129b 100644 --- a/style/src/container.rs +++ b/style/src/container.rs @@ -43,17 +43,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