about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/scope.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-03T01·20+0300
committertazjin <tazjin@tvl.su>2022-09-08T20·17+0000
commit09eaa0d4ae63b0513c934535a40fa2aaa25846e1 (patch)
tree8070b85c5408b5f3d7073c025a322c27502fc581 /tvix/eval/src/compiler/scope.rs
parentfe047885d75a97bd303176847db7fdb2a781344d (diff)
fix(tvix/eval): address current clippy & grfn lints r/4763
Change-Id: I65c6feb9f817b5b367d37204a1f57acfe4100d97
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6430
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/compiler/scope.rs')
-rw-r--r--tvix/eval/src/compiler/scope.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs
index eb722a2c6972..874c6168c1c7 100644
--- a/tvix/eval/src/compiler/scope.rs
+++ b/tvix/eval/src/compiler/scope.rs
@@ -180,10 +180,11 @@ impl Scope {
     /// correctly nesting scopes in lambdas and thunks when special
     /// scope features like poisoning are present).
     pub fn inherit(&self) -> Self {
-        let mut scope = Self::default();
-        scope.poisoned_tokens = self.poisoned_tokens.clone();
-        scope.scope_depth = self.scope_depth;
-        scope
+        Self {
+            poisoned_tokens: self.poisoned_tokens.clone(),
+            scope_depth: self.scope_depth,
+            ..Default::default()
+        }
     }
 
     /// Check whether a given token is poisoned.