Skip to content

Commit

Permalink
fix: clippy warns
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Aug 24, 2024
1 parent 024789d commit 80477f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions pumpkin/src/client/player_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ impl Player {

self.awaiting_teleport = None;
} else {
self.kick(TextComponent::text(
"Wrong teleport id",
))
self.kick(TextComponent::text("Wrong teleport id"))
}
} else {
self.kick(TextComponent::text(
Expand Down
2 changes: 1 addition & 1 deletion pumpkin/src/entity/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl Player {
pub fn teleport(&mut self, x: f64, y: f64, z: f64, yaw: f32, pitch: f32) {
// this is the ultra special magic code used to create the teleport id
self.teleport_id_count += 1;
if self.teleport_id_count == i32::max_value() {
if self.teleport_id_count == i32::MAX {
self.teleport_id_count = 0;
}
let entity = &mut self.entity;
Expand Down

0 comments on commit 80477f9

Please sign in to comment.