about summary refs log tree commit diff
path: root/tvix/eval/src/compiler
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-11-05T17·31+0300
committerclbot <clbot@tvl.fyi>2023-11-05T20·28+0000
commitb3b1f649d613c97a196528b1210dd5b914995c14 (patch)
tree7ec2a8190c8086325a7962ff74685c88954b91c3 /tvix/eval/src/compiler
parent67999f0dcf715962b8f56c9bfd8c5c403213cb02 (diff)
chore(tvix): fix trivial clippy lints r/6955
Relates to b/321.

Change-Id: I37284f89b186e469eb432e2bbedb37aa125a6ad4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9961
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/compiler')
-rw-r--r--tvix/eval/src/compiler/mod.rs8
1 files changed, 4 insertions, 4 deletions
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<GlobalsMap>| {
         // 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