diff options
| author | mat <github@matdoes.dev> | 2022-10-15 16:53:34 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-10-15 16:53:34 -0500 |
| commit | 98224cf91337aa312b72de87ea4c1b22794619b2 (patch) | |
| tree | a00f3468543d292c1b6f4eb212fcc3e3b3e13e2e /azalea-nbt/src | |
| parent | a348f67b9646cf51bedf413bf79271391bdb23b2 (diff) | |
| download | azalea-drasl-98224cf91337aa312b72de87ea4c1b22794619b2.tar.xz | |
fix clippy warnings
Diffstat (limited to 'azalea-nbt/src')
| -rwxr-xr-x | azalea-nbt/src/decode.rs | 4 |
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>()?); } |
