fix: clippy warns

This commit is contained in:
Snowiiii 2024-08-25 00:19:16 +02:00
parent 024789dfbb
commit 80477f9aab
2 changed files with 2 additions and 4 deletions

View File

@ -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(

View File

@ -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;