aboutsummaryrefslogtreecommitdiff
path: root/azalea-buf/src/write.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-buf/src/write.rs')
-rw-r--r--azalea-buf/src/write.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea-buf/src/write.rs b/azalea-buf/src/write.rs
index 0bbed25b..9b50a1c4 100644
--- a/azalea-buf/src/write.rs
+++ b/azalea-buf/src/write.rs
@@ -194,7 +194,7 @@ impl McBufWritable for u64 {
impl McBufWritable for bool {
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
- let byte: u8 = if *self { 1 } else { 0 };
+ let byte = u8::from(*self);
byte.write_into(buf)
}
}