aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-10-27 21:22:47 -0500
committermat <github@matdoes.dev>2022-10-27 21:22:47 -0500
commit9de6c03dfbaa08890b1ec8322a97b7097d4a9d37 (patch)
treef8a2e96893036b32ab2299df49fa5b88fb5187da /azalea-core/src
parent7ae8bfab5095b8d6fe71f32a0b1cda8a47ccff94 (diff)
downloadazalea-drasl-9de6c03dfbaa08890b1ec8322a97b7097d4a9d37.tar.xz
use variables directly in format strings
thanks clippy we love you
Diffstat (limited to 'azalea-core/src')
-rwxr-xr-xazalea-core/src/difficulty.rs4
-rw-r--r--azalea-core/src/direction.rs2
-rwxr-xr-xazalea-core/src/game_type.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/azalea-core/src/difficulty.rs b/azalea-core/src/difficulty.rs
index 5cc2f9fa..9d504307 100755
--- a/azalea-core/src/difficulty.rs
+++ b/azalea-core/src/difficulty.rs
@@ -20,7 +20,7 @@ pub enum Err {
impl Debug for Err {
fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
match self {
- Err::InvalidDifficulty(s) => write!(f, "Invalid difficulty: {}", s),
+ Err::InvalidDifficulty(s) => write!(f, "Invalid difficulty: {s}"),
}
}
}
@@ -52,7 +52,7 @@ impl Difficulty {
2 => Difficulty::NORMAL,
3 => Difficulty::HARD,
// this shouldn't be possible because of the modulo, so panicking is fine
- _ => panic!("Unknown difficulty id: {}", id),
+ _ => panic!("Unknown difficulty id: {id}"),
}
}
diff --git a/azalea-core/src/direction.rs b/azalea-core/src/direction.rs
index dcc9a654..6a29cab9 100644
--- a/azalea-core/src/direction.rs
+++ b/azalea-core/src/direction.rs
@@ -42,7 +42,7 @@ impl Axis {
0 => Axis::X,
1 => Axis::Y,
2 => Axis::Z,
- _ => panic!("Invalid ordinal {}", ordinal),
+ _ => panic!("Invalid ordinal {ordinal}"),
}
}
}
diff --git a/azalea-core/src/game_type.rs b/azalea-core/src/game_type.rs
index 635ee6fe..f1f08962 100755
--- a/azalea-core/src/game_type.rs
+++ b/azalea-core/src/game_type.rs
@@ -73,7 +73,7 @@ impl GameType {
"creative" => GameType::CREATIVE,
"adventure" => GameType::ADVENTURE,
"spectator" => GameType::SPECTATOR,
- _ => panic!("Unknown game type name: {}", name),
+ _ => panic!("Unknown game type name: {name}"),
}
}
}