From f8130c3c92946d2293634ba4e252d6bc93026c3c Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 23 Feb 2025 03:10:21 +0000 Subject: minor memory usage optimizations --- azalea-buf/src/write.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'azalea-buf/src/write.rs') 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 AzaleaWrite for (A, B) { self.1.azalea_write(buf) } } + +impl AzaleaWrite for Arc { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), io::Error> { + T::azalea_write(&**self, buf) + } +} -- cgit v1.2.3