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 <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
67999f0dcf
commit
b3b1f649d6
14 changed files with 35 additions and 36 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue