aboutsummaryrefslogtreecommitdiff
path: root/azalea-nbt/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-nbt/src')
-rwxr-xr-xazalea-nbt/src/encode.rs2
-rwxr-xr-xazalea-nbt/src/tag.rs6
2 files changed, 7 insertions, 1 deletions
diff --git a/azalea-nbt/src/encode.rs b/azalea-nbt/src/encode.rs
index 20d13793..fb5585b3 100755
--- a/azalea-nbt/src/encode.rs
+++ b/azalea-nbt/src/encode.rs
@@ -98,7 +98,7 @@ fn write_compound(
if end_tag {
writer.write_u8(Tag::End.id())?;
}
- return Ok(());
+ Ok(())
}
#[inline]
diff --git a/azalea-nbt/src/tag.rs b/azalea-nbt/src/tag.rs
index 61bd15ba..e2df08f7 100755
--- a/azalea-nbt/src/tag.rs
+++ b/azalea-nbt/src/tag.rs
@@ -17,6 +17,12 @@ pub enum Tag {
LongArray(Vec<i64>), // 12
}
+impl Default for Tag {
+ fn default() -> Self {
+ Tag::End
+ }
+}
+
impl Tag {
#[inline]
pub fn id(&self) -> u8 {