diff options
author | 2021-10-18 14:48:33 +0700 | |
---|---|---|
committer | 2021-10-18 14:48:33 +0700 | |
commit | 54a9a232f8110364972a8eef966b7b7477573f4f (patch) | |
tree | a6abebbcfefbd53d4c4d006d6911353801ea3284 /style | |
parent | a4f4d831615899046d36c96e6a580d5386aa25bf (diff) | |
download | iced-54a9a232f8110364972a8eef966b7b7477573f4f.tar.gz iced-54a9a232f8110364972a8eef966b7b7477573f4f.tar.bz2 iced-54a9a232f8110364972a8eef966b7b7477573f4f.zip |
Draw scrollbar in `Widget::draw` for `Scrollable`
Diffstat (limited to 'style')
-rw-r--r-- | style/src/scrollable.rs | 13 |
1 files changed, 2 insertions, 11 deletions
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<dyn StyleSheet> { +impl std::default::Default for &'static dyn StyleSheet { fn default() -> Self { - Box::new(Default) - } -} - -impl<T> From<T> for Box<dyn StyleSheet> -where - T: 'static + StyleSheet, -{ - fn from(style: T) -> Self { - Box::new(style) + &Default } } |