about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nar/writer/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/nix-compat/src/nar/writer/sync.rs')
-rw-r--r--tvix/nix-compat/src/nar/writer/sync.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/nar/writer/sync.rs b/tvix/nix-compat/src/nar/writer/sync.rs
index 9290e4a5bdfe..071aab831c20 100644
--- a/tvix/nix-compat/src/nar/writer/sync.rs
+++ b/tvix/nix-compat/src/nar/writer/sync.rs
@@ -192,8 +192,7 @@ impl<'a, 'w> Directory<'a, 'w> {
                         _prev_name.as_bstr(),
                         name.as_bstr()
                     );
-                    _prev_name.clear();
-                    _prev_name.extend_from_slice(name);
+                    name.clone_into(_prev_name);
                 }
                 self.node.write(&wire::TOK_PAR)?;
             }