mirror of
https://github.com/nushell/nushell.git
synced 2024-11-07 09:04:18 +01: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
@ -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 New Issue
Block a user