From 15f794b7a89efb3299cb85b392ec13af145fb0fd Mon Sep 17 00:00:00 2001 From: Poly Date: Mon, 4 Jul 2022 01:17:29 +0200 Subject: Address Clippy lints --- pure/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pure/src/lib.rs') diff --git a/pure/src/lib.rs b/pure/src/lib.rs index 95aa3098..49b23e1b 100644 --- a/pure/src/lib.rs +++ b/pure/src/lib.rs @@ -146,7 +146,7 @@ where content: impl Into>, ) -> Self { let element = content.into(); - let _ = state.diff(&element); + state.diff(&element); Self { state, element } } -- cgit From 2f76a10a1d3617e414fb33c0c6cd5cb7782197ad Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 9 Jul 2022 18:03:59 +0200 Subject: Fix further `clippy` lints ... and explicitly annotate crates as well. --- pure/src/lib.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'pure/src/lib.rs') diff --git a/pure/src/lib.rs b/pure/src/lib.rs index 49b23e1b..b8351f48 100644 --- a/pure/src/lib.rs +++ b/pure/src/lib.rs @@ -82,10 +82,18 @@ #![doc( html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg" )] -#![deny(missing_docs)] -#![deny(unused_results)] -#![forbid(unsafe_code)] -#![forbid(rust_2018_idioms)] +#![deny( + missing_docs, + unused_results, + clippy::extra_unused_lifetimes, + clippy::from_over_into, + clippy::needless_borrow, + clippy::new_without_default, + clippy::useless_conversion +)] +#![forbid(rust_2018_idioms, unsafe_code)] +#![allow(clippy::inherent_to_string, clippy::type_complexity)] +#![cfg_attr(docsrs, feature(doc_cfg))] pub mod flex; pub mod helpers; -- cgit From 2065a40f642589134142a740ff4198deaa4c378b Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 9 Jul 2022 18:42:41 +0200 Subject: Fix `clippy` lints for all crates and features ... and check those in CI as well! --- pure/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pure/src/lib.rs') diff --git a/pure/src/lib.rs b/pure/src/lib.rs index b8351f48..9c5f3bc8 100644 --- a/pure/src/lib.rs +++ b/pure/src/lib.rs @@ -280,13 +280,13 @@ where } } -impl<'a, Message, Renderer> Into> - for Pure<'a, Message, Renderer> +impl<'a, Message, Renderer> From> + for iced_native::Element<'a, Message, Renderer> where Message: 'a, Renderer: iced_native::Renderer + 'a, { - fn into(self) -> iced_native::Element<'a, Message, Renderer> { - iced_native::Element::new(self) + fn from(pure: Pure<'a, Message, Renderer>) -> Self { + Self::new(pure) } } -- cgit