about summary refs log tree commit diff
path: root/tvix/nix-compat/src/wire/ser/bytes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/nix-compat/src/wire/ser/bytes.rs')
-rw-r--r--tvix/nix-compat/src/wire/ser/bytes.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tvix/nix-compat/src/wire/ser/bytes.rs b/tvix/nix-compat/src/wire/ser/bytes.rs
index 4338d3f8761e..737edb059b5b 100644
--- a/tvix/nix-compat/src/wire/ser/bytes.rs
+++ b/tvix/nix-compat/src/wire/ser/bytes.rs
@@ -38,6 +38,15 @@ impl NixSerialize for str {
     }
 }
 
+impl NixSerialize for &str {
+    async fn serialize<W>(&self, writer: &mut W) -> Result<(), W::Error>
+    where
+        W: NixWrite,
+    {
+        writer.write_slice(self.as_bytes()).await
+    }
+}
+
 #[cfg(test)]
 mod test {
     use hex_literal::hex;