aboutsummaryrefslogtreecommitdiff
path: root/azalea-nbt/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-10-15 16:53:34 -0500
committermat <github@matdoes.dev>2022-10-15 16:53:34 -0500
commit98224cf91337aa312b72de87ea4c1b22794619b2 (patch)
treea00f3468543d292c1b6f4eb212fcc3e3b3e13e2e /azalea-nbt/src
parenta348f67b9646cf51bedf413bf79271391bdb23b2 (diff)
downloadazalea-drasl-98224cf91337aa312b72de87ea4c1b22794619b2.tar.xz
fix clippy warnings
Diffstat (limited to 'azalea-nbt/src')
-rwxr-xr-xazalea-nbt/src/decode.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-nbt/src/decode.rs b/azalea-nbt/src/decode.rs
index a811bb1f..6937dc05 100755
--- a/azalea-nbt/src/decode.rs
+++ b/azalea-nbt/src/decode.rs
@@ -98,7 +98,7 @@ impl Tag {
if length * 4 > (stream.get_ref().len() - stream.position() as usize) {
return Err(Error::UnexpectedEof);
}
- let mut ints = Vec::with_capacity(length as usize);
+ let mut ints = Vec::with_capacity(length);
for _ in 0..length {
ints.push(stream.read_i32::<BE>()?);
}
@@ -111,7 +111,7 @@ impl Tag {
if length * 8 > (stream.get_ref().len() - stream.position() as usize) {
return Err(Error::UnexpectedEof);
}
- let mut longs = Vec::with_capacity(length as usize);
+ let mut longs = Vec::with_capacity(length);
for _ in 0..length {
longs.push(stream.read_i64::<BE>()?);
}