aboutsummaryrefslogtreecommitdiff
path: root/azalea-buf/src/write.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-12-19 13:07:19 +1100
committermat <git@matdoes.dev>2025-12-19 13:07:19 +1100
commitb300cd7b36a5ba6f5be58e1942da8e2c866106e6 (patch)
tree71f2ff46aae542aa9f78097c9442dea9130be3de /azalea-buf/src/write.rs
parent7c468692c7adf6c9a4796aa8010f20ced4618327 (diff)
downloadazalea-drasl-b300cd7b36a5ba6f5be58e1942da8e2c866106e6.tar.xz
smaller EntityDataValue type
Diffstat (limited to 'azalea-buf/src/write.rs')
-rw-r--r--azalea-buf/src/write.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/azalea-buf/src/write.rs b/azalea-buf/src/write.rs
index 8c2d88ea..4fcce7a0 100644
--- a/azalea-buf/src/write.rs
+++ b/azalea-buf/src/write.rs
@@ -126,7 +126,13 @@ impl AzaleaWrite for Vec<u8> {
impl AzaleaWrite for String {
fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> {
- write_utf_with_len(buf, self, MAX_STRING_LENGTH.into())
+ self.as_str().azalea_write(buf)
+ }
+}
+
+impl AzaleaWrite for Box<str> {
+ fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> {
+ (&**self).azalea_write(buf)
}
}