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! --- graphics/src/widget/canvas/path/builder.rs | 6 ++++++ graphics/src/widget/pure/qr_code.rs | 8 ++++---- graphics/src/widget/qr_code.rs | 8 ++++---- 3 files changed, 14 insertions(+), 8 deletions(-) (limited to 'graphics/src/widget') diff --git a/graphics/src/widget/canvas/path/builder.rs b/graphics/src/widget/canvas/path/builder.rs index 2f1f85a0..05316d8a 100644 --- a/graphics/src/widget/canvas/path/builder.rs +++ b/graphics/src/widget/canvas/path/builder.rs @@ -151,3 +151,9 @@ impl Builder { } } } + +impl Default for Builder { + fn default() -> Self { + Self::new() + } +} diff --git a/graphics/src/widget/pure/qr_code.rs b/graphics/src/widget/pure/qr_code.rs index 23a8ceb6..bff391fe 100644 --- a/graphics/src/widget/pure/qr_code.rs +++ b/graphics/src/widget/pure/qr_code.rs @@ -53,12 +53,12 @@ where } } -impl<'a, Message, B, T> Into>> - for QRCode<'a> +impl<'a, Message, B, T> From> + for Element<'a, Message, Renderer> where B: Backend, { - fn into(self) -> Element<'a, Message, Renderer> { - Element::new(self) + fn from(qr_code: QRCode<'a>) -> Self { + Self::new(qr_code) } } diff --git a/graphics/src/widget/qr_code.rs b/graphics/src/widget/qr_code.rs index 86a27fd0..1a5c0b0a 100644 --- a/graphics/src/widget/qr_code.rs +++ b/graphics/src/widget/qr_code.rs @@ -125,13 +125,13 @@ where } } -impl<'a, Message, B, T> Into>> - for QRCode<'a> +impl<'a, Message, B, T> From> + for Element<'a, Message, Renderer> where B: Backend, { - fn into(self) -> Element<'a, Message, Renderer> { - Element::new(self) + fn from(qr_code: QRCode<'a>) -> Self { + Self::new(qr_code) } } -- cgit