diff options
author | 2019-11-22 21:16:40 +0100 | |
---|---|---|
committer | 2019-11-22 21:16:40 +0100 | |
commit | d136b7ce648cde0dcdcc5388d8cb82b3e7e0fc58 (patch) | |
tree | f9d6d1bc6366cca18a1fa6bfae977364cfc03447 /native/src | |
parent | 42e775fecec81acd40dbc5f536c8a4cd98a03662 (diff) | |
download | iced-d136b7ce648cde0dcdcc5388d8cb82b3e7e0fc58.tar.gz iced-d136b7ce648cde0dcdcc5388d8cb82b3e7e0fc58.tar.bz2 iced-d136b7ce648cde0dcdcc5388d8cb82b3e7e0fc58.zip |
Uncomment missing debug implementations rule
Diffstat (limited to 'native/src')
-rw-r--r-- | native/src/element.rs | 1 | ||||
-rw-r--r-- | native/src/lib.rs | 2 | ||||
-rw-r--r-- | native/src/renderer/null.rs | 1 | ||||
-rw-r--r-- | native/src/user_interface.rs | 1 | ||||
-rw-r--r-- | native/src/widget/button.rs | 15 | ||||
-rw-r--r-- | native/src/widget/checkbox.rs | 1 | ||||
-rw-r--r-- | native/src/widget/column.rs | 1 | ||||
-rw-r--r-- | native/src/widget/container.rs | 2 | ||||
-rw-r--r-- | native/src/widget/radio.rs | 1 | ||||
-rw-r--r-- | native/src/widget/row.rs | 2 | ||||
-rw-r--r-- | native/src/widget/scrollable.rs | 1 | ||||
-rw-r--r-- | native/src/widget/slider.rs | 1 | ||||
-rw-r--r-- | native/src/widget/text_input.rs | 1 |
13 files changed, 26 insertions, 4 deletions
diff --git a/native/src/element.rs b/native/src/element.rs index 5335fdc1..d4237fd0 100644 --- a/native/src/element.rs +++ b/native/src/element.rs @@ -13,6 +13,7 @@ use crate::{ /// [built-in widget]: widget/index.html#built-in-widgets /// [`Widget`]: widget/trait.Widget.html /// [`Element`]: struct.Element.html +#[allow(missing_debug_implementations)] pub struct Element<'a, Message, Renderer> { pub(crate) widget: Box<dyn Widget<Message, Renderer> + 'a>, } diff --git a/native/src/lib.rs b/native/src/lib.rs index 57d014b6..4680cbe1 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -29,7 +29,7 @@ //! [`Windowed`]: renderer/trait.Windowed.html //! [`UserInterface`]: struct.UserInterface.html #![deny(missing_docs)] -//#![deny(missing_debug_implementations)] +#![deny(missing_debug_implementations)] #![deny(unused_results)] #![deny(unsafe_code)] #![deny(rust_2018_idioms)] diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs index 3334e6b6..182f033a 100644 --- a/native/src/renderer/null.rs +++ b/native/src/renderer/null.rs @@ -5,6 +5,7 @@ use crate::{ }; /// A renderer that does nothing. +#[derive(Debug, Clone, Copy)] pub struct Null; impl Renderer for Null { diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs index 00ab8ea8..9833c815 100644 --- a/native/src/user_interface.rs +++ b/native/src/user_interface.rs @@ -10,6 +10,7 @@ use std::hash::Hasher; /// charge of using this type in your system in any way you want. /// /// [`Layout`]: struct.Layout.html +#[allow(missing_debug_implementations)] pub struct UserInterface<'a, Message, Renderer> { hash: u64, root: Element<'a, Message, Renderer>, diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index 81cb9310..159cd07e 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -12,7 +12,20 @@ use crate::{ }; use std::hash::Hash; -/// A generic widget that produces a message when clicked. +/// A generic widget that produces a message when pressed. +/// +/// ``` +/// # use iced_native::{button, Button}; +/// +/// enum Message { +/// ButtonPressed, +/// } +/// +/// let mut state = button::State::new(); +/// let button = Button::new(&mut state, Text::new("Press me!")) +/// .on_press(Message::ButtonPressed); +/// ``` +#[allow(missing_debug_implementations)] pub struct Button<'a, Message, Renderer> { state: &'a mut State, content: Element<'a, Message, Renderer>, diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs index 8101e6be..655fd0ae 100644 --- a/native/src/widget/checkbox.rs +++ b/native/src/widget/checkbox.rs @@ -25,6 +25,7 @@ use crate::{ /// ``` /// ///  +#[allow(missing_debug_implementations)] pub struct Checkbox<Message> { is_checked: bool, on_toggle: Box<dyn Fn(bool) -> Message>, diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs index 281437fd..cdcf25af 100644 --- a/native/src/widget/column.rs +++ b/native/src/widget/column.rs @@ -12,6 +12,7 @@ use std::u32; /// A [`Column`] will try to fill the horizontal space of its container. /// /// [`Column`]: struct.Column.html +#[allow(missing_debug_implementations)] pub struct Column<'a, Message, Renderer> { spacing: u16, padding: u16, diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs index 64a5f4da..7852eecf 100644 --- a/native/src/widget/container.rs +++ b/native/src/widget/container.rs @@ -10,7 +10,7 @@ use std::u32; /// An element decorating some content. /// /// It is normally used for alignment purposes. -#[allow(missing_docs)] +#[allow(missing_debug_implementations)] pub struct Container<'a, Message, Renderer> { width: Length, height: Length, diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index 4e48728f..cc642d1c 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -33,6 +33,7 @@ use std::hash::Hash; /// ``` /// ///  +#[allow(missing_debug_implementations)] pub struct Radio<Message> { is_selected: bool, on_click: Message, diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index 34c7ca7c..c854aff7 100644 --- a/native/src/widget/row.rs +++ b/native/src/widget/row.rs @@ -12,7 +12,7 @@ use std::u32; /// A [`Row`] will try to fill the horizontal space of its container. /// /// [`Row`]: struct.Row.html -#[allow(missing_docs)] +#[allow(missing_debug_implementations)] pub struct Row<'a, Message, Renderer> { spacing: u16, padding: u16, diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index 7b231b5f..0d745756 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -10,6 +10,7 @@ use std::{f32, hash::Hash, u32}; /// A widget that can vertically display an infinite amount of content with a /// scrollbar. +#[allow(missing_debug_implementations)] pub struct Scrollable<'a, Message, Renderer> { state: &'a mut State, height: Length, diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index fe503c34..49cf0368 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -35,6 +35,7 @@ use std::{hash::Hash, ops::RangeInclusive}; /// ``` /// ///  +#[allow(missing_debug_implementations)] pub struct Slider<'a, Message> { state: &'a mut State, range: RangeInclusive<f32>, diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index c3876b1d..fbf144e3 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -30,6 +30,7 @@ use crate::{ /// Message::TextInputChanged, /// ); /// ``` +#[allow(missing_debug_implementations)] pub struct TextInput<'a, Message> { state: &'a mut State, placeholder: String, |