diff options
author | 2023-04-11 05:48:12 +0200 | |
---|---|---|
committer | 2023-04-11 05:48:12 +0200 | |
commit | 870b2fe513bd5b3fbcf3ba369afb14d68324aaa2 (patch) | |
tree | 7ec9639f63de3b6d30e1a830e0b225a86823a095 /native/src/widget/text_input.rs | |
parent | 9852b4b36442ef036f0b308f798e892ddaa06c2d (diff) | |
download | iced-870b2fe513bd5b3fbcf3ba369afb14d68324aaa2.tar.gz iced-870b2fe513bd5b3fbcf3ba369afb14d68324aaa2.tar.bz2 iced-870b2fe513bd5b3fbcf3ba369afb14d68324aaa2.zip |
Derive `Debug` for `text_input::Icon`
Diffstat (limited to 'native/src/widget/text_input.rs')
-rw-r--r-- | native/src/widget/text_input.rs | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index f331f05a..a7fdcb1c 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -32,19 +32,16 @@ use crate::{ pub use iced_style::text_input::{Appearance, StyleSheet}; /// The position of the [`Icon`]. -#[derive(Clone, Default, Debug)] +#[derive(Debug, Clone)] pub enum IconPosition { /// Position the [`Icon`] to the left. Left, - /// Position the [`Icon`] to the left. - /// - /// This is the default. - #[default] + /// Position the [`Icon`] to the right. Right, } /// The content of the [`Icon`]. -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct Icon<Font> { /// Font that will be used to display the `code_point`. pub font: Font, @@ -58,19 +55,6 @@ pub struct Icon<Font> { pub position: IconPosition, } -impl<Renderer> std::fmt::Debug for Icon<Renderer> -where - Renderer: text::Renderer, -{ - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("Icon") - .field("code_point", &self.code_point) - .field("size", &self.size) - .field("position", &self.position) - .finish() - } -} - /// A field that can be filled with text. /// /// # Example |