Be explicit about reduce args and input (#13646)

# Description

`run_with_value` is meant for running simple closures with one arg.
Using `run_with_value` after `add_arg` is slightly confusing.
This commit is contained in:
Ian Manske 2024-08-22 02:39:21 -07:00 committed by GitHub
parent 7a888c9e9b
commit 9261c0c55a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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