aboutsummaryrefslogtreecommitdiff
path: root/pixel-client/src/game.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-16 18:00:28 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-16 18:00:35 +0200
commit499f4994a6a8507dcca20ed820c851be9a2343c1 (patch)
tree9100c6c924e116e811d94d7188353f87819d02d3 /pixel-client/src/game.rs
parent709fd5ddaaec290165e85b48b237cb82563b9e87 (diff)
downloadhurrycurry-499f4994a6a8507dcca20ed820c851be9a2343c1.tar
hurrycurry-499f4994a6a8507dcca20ed820c851be9a2343c1.tar.bz2
hurrycurry-499f4994a6a8507dcca20ed820c851be9a2343c1.tar.zst
fix all clippy things
Diffstat (limited to 'pixel-client/src/game.rs')
-rw-r--r--pixel-client/src/game.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/pixel-client/src/game.rs b/pixel-client/src/game.rs
index fb81ba90..780cde42 100644
--- a/pixel-client/src/game.rs
+++ b/pixel-client/src/game.rs
@@ -371,12 +371,10 @@ impl Game {
PacketC::Communicate {
player,
message,
- timeout,
+ timeout: Some(timeout),
} => {
- if let Some(timeout) = timeout {
- if let Some(player) = self.players.get_mut(&player) {
- player.message_persist = message.map(|m| (m, timeout));
- }
+ if let Some(player) = self.players.get_mut(&player) {
+ player.message_persist = message.map(|m| (m, timeout));
}
}
PacketC::Error { message } => {
@@ -496,7 +494,7 @@ impl Player {
}
}
if let Some(item) = &self.item {
- item.draw(ctx, &item_sprites)
+ item.draw(ctx, item_sprites)
}
}
}