From 7c08c6bd138207b862933ee479752a4f1d18c4f2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 21 Oct 2021 18:50:27 +0700 Subject: Remove `Renderer` trait for `Checkbox` --- style/src/checkbox.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'style') diff --git a/style/src/checkbox.rs b/style/src/checkbox.rs index 566136bb..4c88faaa 100644 --- a/style/src/checkbox.rs +++ b/style/src/checkbox.rs @@ -39,17 +39,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