From e914888f57394e4b67b40e42f1ad9df4ae8147e6 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Oct 2021 18:40:39 +0700 Subject: Implement `Widget::draw` for `TextInput` --- style/src/text_input.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'style') diff --git a/style/src/text_input.rs b/style/src/text_input.rs index 19acea65..13b64cd5 100644 --- a/style/src/text_input.rs +++ b/style/src/text_input.rs @@ -73,17 +73,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