From 42b1bfe66d2407901c1ae640f80ce9e0d3c64b60 Mon Sep 17 00:00:00 2001 From: 13r0ck Date: Fri, 27 Jan 2023 13:25:04 -0700 Subject: Fix: Clippy lint 'uninlined_format_args' --- src/window/icon.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/window/icon.rs b/src/window/icon.rs index bacad41a..d57eb79c 100644 --- a/src/window/icon.rs +++ b/src/window/icon.rs @@ -133,10 +133,9 @@ impl fmt::Display for Error { Error::InvalidData { byte_count } => { write!( f, - "The provided RGBA data (with length {:?}) isn't divisble by \ + "The provided RGBA data (with length {byte_count:?}) isn't divisble by \ 4. Therefore, it cannot be safely interpreted as 32bpp RGBA \ - pixels.", - byte_count, + pixels." ) } Error::DimensionsMismatch { @@ -146,20 +145,18 @@ impl fmt::Display for Error { } => { write!( f, - "The number of RGBA pixels ({:?}) does not match the provided \ - dimensions ({:?}x{:?}).", - pixel_count, width, height, + "The number of RGBA pixels ({pixel_count:?}) does not match the provided \ + dimensions ({width:?}x{height:?})." ) } Error::OsError(e) => write!( f, "The underlying OS failed to create the window \ - icon: {:?}", - e + icon: {e:?}" ), #[cfg(feature = "image_rs")] Error::ImageError(e) => { - write!(f, "Unable to create icon from a file: {:?}", e) + write!(f, "Unable to create icon from a file: {e:?}") } } } -- cgit From efaa80fb4429e7f9bd2f8a1161be3fa66a3e9e32 Mon Sep 17 00:00:00 2001 From: Casper Storm Date: Thu, 26 Jan 2023 12:20:43 +0100 Subject: Extend pick_list::Handle --- src/widget.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/widget.rs b/src/widget.rs index f0058f57..00edd763 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -80,7 +80,9 @@ pub mod pane_grid { pub mod pick_list { //! Display a dropdown list of selectable values. - pub use iced_native::widget::pick_list::{Appearance, Handle, StyleSheet}; + pub use iced_native::widget::pick_list::{ + Appearance, Handle, HandleContent, StyleSheet, + }; /// A widget allowing the selection of a single value from a list of options. pub type PickList<'a, T, Message, Renderer = crate::Renderer> = -- cgit From 5569e12149f9c29345fe404552ce156ef0bebf0e Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 14 Feb 2023 06:56:59 +0100 Subject: Rename `HandleContent` to `Icon` and simplify generics --- src/widget.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/widget.rs b/src/widget.rs index 00edd763..5bf7b6b4 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -81,7 +81,7 @@ pub mod pane_grid { pub mod pick_list { //! Display a dropdown list of selectable values. pub use iced_native::widget::pick_list::{ - Appearance, Handle, HandleContent, StyleSheet, + Appearance, Handle, Icon, StyleSheet, }; /// A widget allowing the selection of a single value from a list of options. -- cgit