From 54a9a232f8110364972a8eef966b7b7477573f4f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 18 Oct 2021 14:48:33 +0700 Subject: Draw scrollbar in `Widget::draw` for `Scrollable` --- style/src/scrollable.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'style') diff --git a/style/src/scrollable.rs b/style/src/scrollable.rs index 65da9803..741d9d39 100644 --- a/style/src/scrollable.rs +++ b/style/src/scrollable.rs @@ -60,17 +60,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