From 048909b45dfecef73bfacf3b5aa67462470ccca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Fri, 22 Nov 2019 22:13:54 +0100 Subject: [PATCH] Fix `Button` example in `iced_native` --- native/src/widget/button.rs | 8 +++++--- native/src/widget/slider.rs | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index 159cd07e..023c4ee8 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -4,7 +4,6 @@ //! //! [`Button`]: struct.Button.html //! [`State`]: struct.State.html - use crate::{ input::{mouse, ButtonState}, layout, Background, Element, Event, Hasher, Layout, Length, Point, @@ -15,8 +14,11 @@ use std::hash::Hash; /// A generic widget that produces a message when pressed. /// /// ``` -/// # use iced_native::{button, Button}; -/// +/// # use iced_native::{button, Text}; +/// # +/// # type Button<'a, Message> = +/// # iced_native::Button<'a, Message, iced_native::renderer::Null>; +/// # /// enum Message { /// ButtonPressed, /// } diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index 49cf0368..f07ea7cd 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -4,7 +4,6 @@ //! //! [`Slider`]: struct.Slider.html //! [`State`]: struct.State.html - use crate::{ input::{mouse, ButtonState}, layout, Element, Event, Hasher, Layout, Length, Point, Rectangle, Size,