mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
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:
parent
7a888c9e9b
commit
9261c0c55a
1 changed files with 2 additions and 1 deletions
|
@ -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)?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue