From 4dda0a9853e9222b341510d244cdf9ed2a60d5da Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 6 Jul 2024 22:20:58 +0900 Subject: [PATCH] chore(codec): Use BytesMut put_u8 method to write single byte (#1774) --- tonic/src/codec/compression.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tonic/src/codec/compression.rs b/tonic/src/codec/compression.rs index b1a8b54b3..2e75ef4fc 100644 --- a/tonic/src/codec/compression.rs +++ b/tonic/src/codec/compression.rs @@ -47,7 +47,7 @@ impl EnabledCompressionEncodings { let mut value = BytesMut::new(); for encoding in self.inner.into_iter().flatten() { value.put_slice(encoding.as_str().as_bytes()); - value.put_slice(b","); + value.put_u8(b','); } if value.is_empty() {