From e65fa82d74ff2aa86e30cec94f577114d2879dab Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 22 Nov 2023 22:37:42 +0300 Subject: refactor(tvix/eval): use `or_default` helper in entry API This fixes a future clippy lint. Change-Id: Ic830e94ef23595580c1037f10878c76bbb546dd9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10110 Tested-by: BuildkiteCI Reviewed-by: Adam Joseph --- tvix/eval/src/builtins/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tvix') diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index a8f4d1562d52..f9302deab84b 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -457,9 +457,7 @@ mod pure_builtins { .await .to_str()?; - res.entry(key) - .or_insert_with(imbl::Vector::new) - .push_back(val); + res.entry(key).or_default().push_back(val); } Ok(Value::attrs(NixAttrs::from_iter( res.into_iter() -- cgit 1.4.1