mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 13:46:03 +02:00
Remove duplicate implementations of CallExt::rest
(#14484)
# Description Removes unnecessary usages of `Call::rest_iter_flattened` and `get_rest_for_glob_pattern` and replaces them with `CallExt::rest`. # User-Facing Changes None
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
use nu_cmd_base::hook::eval_hook;
|
||||
use nu_engine::{command_prelude::*, env_to_strings, get_eval_expression};
|
||||
use nu_engine::{command_prelude::*, env_to_strings};
|
||||
use nu_path::{dots::expand_ndots, expand_tilde, AbsolutePath};
|
||||
use nu_protocol::{did_you_mean, process::ChildProcess, ByteStream, NuGlob, OutDest, Signals};
|
||||
use nu_system::ForegroundChild;
|
||||
@ -295,8 +295,7 @@ pub fn eval_arguments_from_call(
|
||||
call: &Call,
|
||||
) -> Result<Vec<Spanned<OsString>>, ShellError> {
|
||||
let cwd = engine_state.cwd(Some(stack))?;
|
||||
let eval_expression = get_eval_expression(engine_state);
|
||||
let call_args = call.rest_iter_flattened(engine_state, stack, eval_expression, 1)?;
|
||||
let call_args = call.rest::<Value>(engine_state, stack, 1)?;
|
||||
let mut args: Vec<Spanned<OsString>> = Vec::with_capacity(call_args.len());
|
||||
|
||||
for arg in call_args {
|
||||
|
Reference in New Issue
Block a user