From b3b1f649d613c97a196528b1210dd5b914995c14 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 5 Nov 2023 20:31:46 +0300 Subject: chore(tvix): fix trivial clippy lints Relates to b/321. Change-Id: I37284f89b186e469eb432e2bbedb37aa125a6ad4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9961 Tested-by: BuildkiteCI Reviewed-by: flokli Autosubmit: tazjin --- tvix/eval/src/compiler/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tvix/eval/src/compiler') diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index cfd50bec5790..01e07304bc3f 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -1004,7 +1004,7 @@ impl Compiler<'_> { // For each of the bindings, push the set on the stack and // attempt to select from it. let stack_idx = self.scope().stack_index(set_idx); - for tracked_formal in (&entries).into_iter() { + for tracked_formal in entries.iter() { self.push_op(OpCode::OpGetLocal(stack_idx), pattern); self.emit_literal_ident(&tracked_formal.pattern_entry().ident().unwrap()); @@ -1067,7 +1067,7 @@ impl Compiler<'_> { } } - for tracked_formal in (&entries).into_iter() { + for tracked_formal in entries.iter() { if self.scope()[tracked_formal.local_idx()].needs_finaliser { let stack_idx = self.scope().stack_index(tracked_formal.local_idx()); match tracked_formal { @@ -1527,7 +1527,7 @@ pub fn prepare_globals( Rc::new_cyclic(Box::new(move |weak: &Weak| { // First step is to construct the builtins themselves as // `NixAttrs`. - let mut builtins: GlobalsMap = HashMap::from_iter(builtins.into_iter()); + let mut builtins: GlobalsMap = HashMap::from_iter(builtins); // At this point, optionally insert `import` if enabled. To // "tie the knot" of `import` needing the full set of globals @@ -1574,7 +1574,7 @@ pub fn prepare_globals( // in the global scope. globals.insert( "builtins", - Value::attrs(NixAttrs::from_iter(builtins.clone().into_iter())), + Value::attrs(NixAttrs::from_iter(builtins.clone())), ); // Finally, the builtins that should be globally available are -- cgit 1.4.1