diff options
| author | mat <git@matdoes.dev> | 2023-12-02 13:45:51 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-12-02 13:45:51 -0600 |
| commit | c898fa5921126b111c705e9215ccdd203340119d (patch) | |
| tree | 5962d30c18d05adea9dbd5f9c640f4c750794202 /azalea-buf/src/write.rs | |
| parent | 2b9b16d28f9825e4e6fe7ea23568dd875471b496 (diff) | |
| download | azalea-drasl-c898fa5921126b111c705e9215ccdd203340119d.tar.xz | |
fix writing nbt
Diffstat (limited to 'azalea-buf/src/write.rs')
| -rwxr-xr-x | azalea-buf/src/write.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-buf/src/write.rs b/azalea-buf/src/write.rs index 03d40d79..c8d1f990 100755 --- a/azalea-buf/src/write.rs +++ b/azalea-buf/src/write.rs @@ -262,7 +262,7 @@ impl McBufWritable for simdnbt::owned::NbtTag { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); self.write(&mut data); - data.write_into(buf) + buf.write_all(&data) } } @@ -270,7 +270,7 @@ impl McBufWritable for simdnbt::owned::NbtCompound { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); simdnbt::owned::NbtTag::Compound(self.clone()).write(&mut data); - data.write_into(buf) + buf.write_all(&data) } } @@ -278,6 +278,6 @@ impl McBufWritable for simdnbt::owned::Nbt { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); self.write_unnamed(&mut data); - data.write_into(buf) + buf.write_all(&data) } } |
