From 09eaa0d4ae63b0513c934535a40fa2aaa25846e1 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 3 Sep 2022 04:20:00 +0300 Subject: fix(tvix/eval): address current clippy & grfn lints Change-Id: I65c6feb9f817b5b367d37204a1f57acfe4100d97 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6430 Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/src/compiler/scope.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tvix/eval/src/compiler/scope.rs') 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. -- cgit 1.4.1