diff options
author | Vincent Ambo <mail@tazj.in> | 2023-11-22T19·37+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-11-25T15·48+0000 |
commit | e65fa82d74ff2aa86e30cec94f577114d2879dab (patch) | |
tree | e98a19a81e35a892a4aea54ff7b915e3ba8f9c96 /tvix/eval/src/builtins | |
parent | 5ffb99786429de1cf830b5aefa251705c5434055 (diff) |
refactor(tvix/eval): use `or_default` helper in entry API r/7065
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 <adam@westernsemico.com>
Diffstat (limited to 'tvix/eval/src/builtins')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 4 |
1 files changed, 1 insertions, 3 deletions
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() |