From 98224cf91337aa312b72de87ea4c1b22794619b2 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 15 Oct 2022 16:53:34 -0500 Subject: fix clippy warnings --- azalea-nbt/src/decode.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'azalea-nbt/src') 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::()?); } @@ -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::()?); } -- cgit v1.2.3