Update src/function/accumulated.rs

This commit is contained in:
Niko Matsakis 2024-07-22 06:59:39 -04:00 committed by GitHub
parent 02008d51a7
commit 49a147a627
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,6 +31,9 @@ where
let origin = db.lookup_ingredient(k.ingredient_index).origin(k.key_index);
let inputs = origin.iter().flat_map(|origin| origin.inputs());
// Careful: we want to push in execution order, so reverse order to
// ensure the first child that was executed will be the first child popped
// from the stack.
stack.extend(
inputs
.flat_map(|input| TryInto::<DatabaseKeyIndex>::try_into(input).into_iter())