Merge pull request #1636 from tarkah/fix/location-copy

Make location copy
This commit is contained in:
Héctor Ramón 2023-01-04 19:32:03 +01:00 committed by GitHub
commit dca3d1fa7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.
@ -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 => {