From 8cdbe7352c4846eb339358bcca6083f747e27721 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Wed, 25 Mar 2020 06:51:22 -0500 Subject: cargo update & lint --- src/animations.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/animations.rs') diff --git a/src/animations.rs b/src/animations.rs index b82b42e..cbaad41 100644 --- a/src/animations.rs +++ b/src/animations.rs @@ -67,7 +67,7 @@ impl Animations { idle.source.h *= 2.0; let animation = Animation::new(vec![idle.clone()]); - available.insert(Action::IdleLeft, animation.clone()); + available.insert(Action::IdleLeft, animation); let mut moving = tileset.get_tile_by_entity_keyframe("player-top", 1); moving.source.h *= 2.0; @@ -75,15 +75,15 @@ impl Animations { let animation = Animation::new(vec![idle.clone(), moving.clone()]); available.insert(Action::MovingLeft, animation.clone()); available.insert(Action::MovingUpLeft, animation.clone()); - available.insert(Action::MovingDownLeft, animation.clone()); + available.insert(Action::MovingDownLeft, animation); let idle = flip(idle); let moving = flip(moving); let animation = Animation::new(vec![idle.clone()]); - available.insert(Action::IdleRight, animation.clone()); + available.insert(Action::IdleRight, animation); - let animation = Animation::new(vec![idle.clone(), moving.clone()]); + let animation = Animation::new(vec![idle, moving]); available.insert(Action::MovingRight, animation.clone()); available.insert(Action::MovingUpRight, animation.clone()); available.insert(Action::MovingDownRight, animation.clone()); -- cgit v1.2.3