reduce: supply <acc> to the closure as pipeline input as well

This commit is contained in:
Bahex 2024-07-26 05:20:38 +03:00 committed by GitHub
parent e68f744dda
commit d6d37b22ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,8 +120,7 @@ impl Command for Reduce {
engine_state.signals().check(head)?;
acc = closure
.add_arg(value)
.add_arg(acc)
.run_with_input(PipelineData::Empty)?
.run_with_value(acc)?
.into_value(head)?;
}