diff options
Diffstat (limited to 'tvix/eval/src')
-rw-r--r-- | tvix/eval/src/compiler/optimiser.rs | 2 | ||||
-rw-r--r-- | tvix/eval/src/lib.rs | 2 | ||||
-rw-r--r-- | tvix/eval/src/value/thunk.rs | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tvix/eval/src/compiler/optimiser.rs b/tvix/eval/src/compiler/optimiser.rs index 4c28b79a851e..48960d355cc6 100644 --- a/tvix/eval/src/compiler/optimiser.rs +++ b/tvix/eval/src/compiler/optimiser.rs @@ -9,7 +9,7 @@ use ast::Expr; pub(super) fn optimise_expr(c: &mut Compiler, slot: LocalIdx, expr: ast::Expr) -> ast::Expr { match expr { Expr::BinOp(_) => optimise_bin_op(c, slot, expr), - _ => expr.to_owned(), + _ => expr, } } diff --git a/tvix/eval/src/lib.rs b/tvix/eval/src/lib.rs index 44fe8af2ccc5..98440975646b 100644 --- a/tvix/eval/src/lib.rs +++ b/tvix/eval/src/lib.rs @@ -303,7 +303,7 @@ fn parse_compile_internal( let compiler_result = match compiler::compile( result.expr.as_ref().unwrap(), location, - file.clone(), + file, builtins, compiler_observer, ) { diff --git a/tvix/eval/src/value/thunk.rs b/tvix/eval/src/value/thunk.rs index c9479fde370f..e30d58e72849 100644 --- a/tvix/eval/src/value/thunk.rs +++ b/tvix/eval/src/value/thunk.rs @@ -189,7 +189,7 @@ impl Thunk { // returning another thunk. ThunkRepr::Native(native) => { let value = native.0(vm)?; - self.0.replace(ThunkRepr::Evaluated(value.clone())); + self.0.replace(ThunkRepr::Evaluated(value)); let self_clone = self.clone(); return Ok(Trampoline { @@ -268,7 +268,7 @@ impl Thunk { ThunkRepr::Native(native) => { let value = native.0(vm)?; self.0.replace(ThunkRepr::Evaluated(value.clone())); - inner.0.replace(ThunkRepr::Evaluated(value.clone())); + inner.0.replace(ThunkRepr::Evaluated(value)); let self_clone = self.clone(); return Ok(Trampoline { @@ -308,7 +308,7 @@ impl Thunk { debug_assert!(matches!(self_blackhole, ThunkRepr::Blackhole)); let inner_blackhole = - inner_clone.0.replace(ThunkRepr::Evaluated(result.clone())); + inner_clone.0.replace(ThunkRepr::Evaluated(result)); debug_assert!(matches!(inner_blackhole, ThunkRepr::Blackhole)); Thunk::force_trampoline(vm, Value::Thunk(self_clone)) @@ -330,7 +330,7 @@ impl Thunk { // out of here and memoize the innermost thunk. ThunkRepr::Evaluated(v) => { self.0.replace(ThunkRepr::Evaluated(v.clone())); - inner.0.replace(ThunkRepr::Evaluated(v.clone())); + inner.0.replace(ThunkRepr::Evaluated(v)); let self_clone = self.clone(); return Ok(Trampoline { |