about summary refs log tree commit diff
path: root/tvix/nix-compat
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-08-19T10·52+0200
committerclbot <clbot@tvl.fyi>2023-08-19T11·47+0000
commit946270142e6b82412558b51fe1c31301e7a439ce (patch)
treeae122c2abe10eff5d09a014dd16132885bc0c459 /tvix/nix-compat
parent311752412bea93aeac5642e7f55c09d12b00d196 (diff)
refactor(tvix/nix-compat/derivation): cargo clippy r/6491
This `.into_iter()` call is equivalent to `.iter()` and will not consume
the `BTreeMap`.

Change-Id: Ie26637ebecb0bea5b09c447cc45ed207f8b50913
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9088
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat')
-rw-r--r--tvix/nix-compat/src/derivation/write.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/tvix/nix-compat/src/derivation/write.rs b/tvix/nix-compat/src/derivation/write.rs
index 538183ac6513..9a6234424816 100644
--- a/tvix/nix-compat/src/derivation/write.rs
+++ b/tvix/nix-compat/src/derivation/write.rs
@@ -111,8 +111,7 @@ pub fn write_input_derivations(
 ) -> Result<(), io::Error> {
     write_char(writer, BRACKET_OPEN)?;
 
-    for (ii, (input_derivation_path, input_derivation)) in input_derivations.into_iter().enumerate()
-    {
+    for (ii, (input_derivation_path, input_derivation)) in input_derivations.iter().enumerate() {
         if ii > 0 {
             write_char(writer, COMMA)?;
         }
@@ -183,7 +182,7 @@ pub fn write_enviroment(
 ) -> Result<(), io::Error> {
     write_char(writer, BRACKET_OPEN)?;
 
-    for (i, (k, v)) in environment.into_iter().enumerate() {
+    for (i, (k, v)) in environment.iter().enumerate() {
         if i > 0 {
             write_char(writer, COMMA)?;
         }