From 12c1a3f829c801022d45f1a294d8fc7fa10606e5 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 9 Mar 2022 14:10:15 +0700 Subject: Remove redundant `widget` modules in subcrates Instead, we can define the type aliases just once in the root crate! --- native/src/widget/scrollable.rs | 7 +++++++ native/src/widget/toggler.rs | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'native') diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index 3752fd71..748fd27d 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -15,6 +15,13 @@ use std::{f32, u32}; pub use iced_style::scrollable::StyleSheet; +pub mod style { + //! The styles of a [`Scrollable`]. + //! + //! [`Scrollable`]: crate::widget::Scrollable + pub use iced_style::scrollable::{Scrollbar, Scroller}; +} + /// A widget that can vertically display an infinite amount of content with a /// scrollbar. #[allow(missing_debug_implementations)] diff --git a/native/src/widget/toggler.rs b/native/src/widget/toggler.rs index a7847871..536aef78 100644 --- a/native/src/widget/toggler.rs +++ b/native/src/widget/toggler.rs @@ -1,5 +1,4 @@ //! Show toggle controls using togglers. - use crate::alignment; use crate::event; use crate::layout; @@ -14,7 +13,7 @@ use crate::{ pub use iced_style::toggler::{Style, StyleSheet}; -/// A toggler widget +/// A toggler widget. /// /// # Example /// -- cgit