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 <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-08-19 12:52:50 +02:00 committed by clbot
parent 311752412b
commit 946270142e

View file

@ -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)?;
}