From 3beca27b6718c7f21678b9400a020ed6665cf1ed Mon Sep 17 00:00:00 2001 From: SimonFJ20 Date: Mon, 8 Apr 2024 13:47:19 +0200 Subject: [PATCH] copy --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6a8a098..5251ee4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,8 @@ impl System for PlayerRenderer { for id in ctx.entities_with_component::() { let &mut Position(x, y) = ctx.entity_component::(id); let player = ctx.entity_component::(id); - let sprite = player.sprite.clone().unwrap(); + + let sprite = player.sprite.unwrap(); ctx.draw_sprite(&sprite, x, y)?; } Ok(())