aboutsummaryrefslogtreecommitdiff
path: root/azalea-nbt/src/encode.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-12-19 13:07:54 -0600
committermat <github@matdoes.dev>2021-12-19 13:07:54 -0600
commit55c9f58219df0fa4a7bdcc2dd34cd71b172f77ea (patch)
tree118c9db496099b0c8fab02e65dc9a0b7a7e5310e /azalea-nbt/src/encode.rs
parentb030b9de9345d7b1cfef205e5b9a1e2c7dc6025e (diff)
downloadazalea-drasl-55c9f58219df0fa4a7bdcc2dd34cd71b172f77ea.tar.xz
nbt tests
Diffstat (limited to 'azalea-nbt/src/encode.rs')
-rw-r--r--azalea-nbt/src/encode.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea-nbt/src/encode.rs b/azalea-nbt/src/encode.rs
index d787e15f..2347bbf3 100644
--- a/azalea-nbt/src/encode.rs
+++ b/azalea-nbt/src/encode.rs
@@ -42,7 +42,7 @@ impl Tag {
}
Tag::List(value) => {
// we just get the type from the first item, or default the type to END
- let type_id = value.first().and_then(|f| Some(f.id())).unwrap_or(0);
+ let type_id = value.first().map(|f| f.id()).unwrap_or(0);
writer.write_u8(type_id).map_err(|_| Error::WriteError)?;
writer
.write_i32::<BE>(value.len() as i32)