diff --git a/src/io/data.rs b/src/io/data.rs index a4e08b7..d475465 100644 --- a/src/io/data.rs +++ b/src/io/data.rs @@ -15,7 +15,7 @@ where .read_to_end(&mut buf) .context("Failed to read file")?; - fastnbt::from_bytes(&buf[..]).context("Failed to decode NBT data") + fastnbt::from_bytes(&buf).context("Failed to decode NBT data") } pub fn from_file(path: P) -> Result diff --git a/src/io/region.rs b/src/io/region.rs index df5578a..1f02017 100644 --- a/src/io/region.rs +++ b/src/io/region.rs @@ -104,10 +104,10 @@ impl Region { let mut buffer = vec![0; (len as usize) * BLOCKSIZE]; reader - .read_exact(&mut buffer[..]) + .read_exact(&mut buffer) .context("Failed to read chunk data")?; - f(coords, decode_chunk(&buffer[..])?); + f(coords, decode_chunk(&buffer)?); index += len as u32; }