From ff49a95ecab6ef9cdf67d9a7fa472e115f064bb4 Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Wed, 4 Jan 2023 09:52:42 -0800 Subject: [PATCH 1/2] Make location copy --- graphics/src/gradient.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index 83f25238b2..42a700f435 100644 --- a/graphics/src/gradient.rs +++ b/graphics/src/gradient.rs @@ -64,7 +64,7 @@ impl From<(Point, Point)> for Position { } } -#[derive(Debug)] +#[derive(Debug, Clone, Copy)] /// The location of a relatively-positioned gradient. pub enum Location { /// Top left. From e8aee70a69a0e10a3288875997f7403453b2d352 Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Wed, 4 Jan 2023 10:17:40 -0800 Subject: [PATCH 2/2] Fix lint --- graphics/src/gradient.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index 42a700f435..61e919d6bf 100644 --- a/graphics/src/gradient.rs +++ b/graphics/src/gradient.rs @@ -86,7 +86,7 @@ pub enum Location { } impl Location { - fn to_absolute(&self, top_left: Point, size: Size) -> Point { + fn to_absolute(self, top_left: Point, size: Size) -> Point { match self { Location::TopLeft => top_left, Location::Top => {