aboutsummaryrefslogtreecommitdiff
path: root/azalea-nbt/src/decode.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-23 15:12:17 -0500
committermat <github@matdoes.dev>2022-06-23 15:12:17 -0500
commit5ca49e680ed8519456dc9a9af84321d4b69dcbb3 (patch)
tree0f727c3e862f60eb227db69c87946a0f629a397d /azalea-nbt/src/decode.rs
parentc7b0c51274b5d8548c8a2f829b75dfbec4038be2 (diff)
downloadazalea-drasl-5ca49e680ed8519456dc9a9af84321d4b69dcbb3.tar.xz
azalea-buf
Diffstat (limited to 'azalea-nbt/src/decode.rs')
-rwxr-xr-xazalea-nbt/src/decode.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/azalea-nbt/src/decode.rs b/azalea-nbt/src/decode.rs
index 7f2ca754..73cd613e 100755
--- a/azalea-nbt/src/decode.rs
+++ b/azalea-nbt/src/decode.rs
@@ -136,3 +136,13 @@ impl Tag {
Tag::read(&mut gz)
}
}
+
+impl McBufReadable for Tag {
+ fn read_into(buf: &mut impl Read) -> Result<Self, String> {
+ match Tag::read(self) {
+ Ok(r) => Ok(r),
+ // Err(e) => Err(e.to_string()),
+ Err(e) => Err(e.to_string()).unwrap(),
+ }
+ }
+}