diff options
author | 2022-11-03 04:53:27 +0100 | |
---|---|---|
committer | 2022-11-03 04:53:27 +0100 | |
commit | 7e22e2d45293c5916812be03dc7367134b69b3ad (patch) | |
tree | 2d1814e37599644ec2bf093ed6ce42eb1a0cb34b /graphics/src/gradient/linear.rs | |
parent | edce457365aae5e1aa20863389cdd28357234908 (diff) | |
download | iced-7e22e2d45293c5916812be03dc7367134b69b3ad.tar.gz iced-7e22e2d45293c5916812be03dc7367134b69b3ad.tar.bz2 iced-7e22e2d45293c5916812be03dc7367134b69b3ad.zip |
Fix lints by `clippy`
Diffstat (limited to 'graphics/src/gradient/linear.rs')
-rw-r--r-- | graphics/src/gradient/linear.rs | 9 |
1 files changed, 3 insertions, 6 deletions
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<Position> 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 } } } |