Use is_absent_and_set.

This commit is contained in:
Stephen Chung
2022-09-12 22:40:52 +08:00
parent 44219c732c
commit 08f6682d09
3 changed files with 17 additions and 8 deletions

View File

@@ -268,9 +268,8 @@ impl Engine {
};
if let Some(f) = func {
if cache.filter.is_absent(hash) {
if cache.filter.is_absent_and_set(hash) {
// Do not cache "one-hit wonders"
cache.filter.mark(hash);
local_entry = CallableFunction::from_fn_builtin(f);
&local_entry
} else {