diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2020-03-25 06:51:22 -0500 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2020-03-25 06:51:22 -0500 |
commit | 8cdbe7352c4846eb339358bcca6083f747e27721 (patch) | |
tree | 36dee15239e98a3c10c5696a4ad696acaf65d39a /src/tile.rs | |
parent | 6d78a950473a4f34df6bae98d2bf2c99632afe4a (diff) |
cargo update & lint
Diffstat (limited to 'src/tile.rs')
-rw-r--r-- | src/tile.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tile.rs b/src/tile.rs index aa950df..d6f5c0e 100644 --- a/src/tile.rs +++ b/src/tile.rs @@ -109,14 +109,14 @@ pub fn convert_angle_to_rad(angle: f32) -> f32 { } pub fn flip(tile: Tile) -> Tile { - let mut t = tile.clone(); + let mut t = tile; t.source.x *= -1.0; t.source.x -= t.source.w; t } pub fn rotate(tile: Tile, angle: f32) -> Tile { - let mut t = tile.clone(); + let mut t = tile; t.properties.rotation = convert_angle_to_rad(angle); t } |