From 7e22e2d45293c5916812be03dc7367134b69b3ad Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 3 Nov 2022 04:53:27 +0100 Subject: Fix lints by `clippy` --- graphics/src/gradient/linear.rs | 9 +++------ graphics/src/layer/mesh.rs | 10 +++------- graphics/src/transformation.rs | 6 +++--- graphics/src/widget/canvas/fill.rs | 6 +++--- 4 files changed, 12 insertions(+), 19 deletions(-) (limited to 'graphics/src') diff --git a/graphics/src/gradient/linear.rs b/graphics/src/gradient/linear.rs index aaa9e234..439e848e 100644 --- a/graphics/src/gradient/linear.rs +++ b/graphics/src/gradient/linear.rs @@ -36,12 +36,9 @@ pub enum Position { }, } -impl Into for (Point, Point) { - fn into(self) -> Position { - Position::Absolute { - start: self.0, - end: self.1, - } +impl From<(Point, Point)> for Position { + fn from((start, end): (Point, Point)) -> Self { + Self::Absolute { start, end } } } diff --git a/graphics/src/layer/mesh.rs b/graphics/src/layer/mesh.rs index a2232a1f..7056db9b 100644 --- a/graphics/src/layer/mesh.rs +++ b/graphics/src/layer/mesh.rs @@ -28,13 +28,9 @@ pub enum Style { Gradient(Gradient), } -impl<'a> Into