aboutsummaryrefslogtreecommitdiff
path: root/azalea-buf/src/write.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-buf/src/write.rs')
-rwxr-xr-xazalea-buf/src/write.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/azalea-buf/src/write.rs b/azalea-buf/src/write.rs
index c4b9f413..73aefe40 100755
--- a/azalea-buf/src/write.rs
+++ b/azalea-buf/src/write.rs
@@ -1,6 +1,7 @@
use std::{
collections::HashMap,
io::{self, Write},
+ sync::Arc,
};
use byteorder::{BigEndian, WriteBytesExt};
@@ -298,3 +299,9 @@ impl<A: AzaleaWrite, B: AzaleaWrite> AzaleaWrite for (A, B) {
self.1.azalea_write(buf)
}
}
+
+impl<T: AzaleaWrite> AzaleaWrite for Arc<T> {
+ fn azalea_write(&self, buf: &mut impl Write) -> Result<(), io::Error> {
+ T::azalea_write(&**self, buf)
+ }
+}