diff options
Diffstat (limited to 'tvix/nix-compat/src/nar/writer/async.rs')
-rw-r--r-- | tvix/nix-compat/src/nar/writer/async.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/nar/writer/async.rs b/tvix/nix-compat/src/nar/writer/async.rs index 2b73e56737ce..dd5c72ac8913 100644 --- a/tvix/nix-compat/src/nar/writer/async.rs +++ b/tvix/nix-compat/src/nar/writer/async.rs @@ -203,8 +203,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).await?; } |