From 946270142e6b82412558b51fe1c31301e7a439ce Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 19 Aug 2023 12:52:50 +0200 Subject: refactor(tvix/nix-compat/derivation): cargo clippy 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 Reviewed-by: raitobezarius Tested-by: BuildkiteCI --- tvix/nix-compat/src/derivation/write.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tvix/nix-compat/src/derivation') 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)?; } -- cgit 1.4.1