mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:36:00 +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:
@ -121,15 +121,12 @@ impl CallExt for ast::Call {
|
||||
starting_pos: usize,
|
||||
) -> Result<Vec<T>, ShellError> {
|
||||
let stack = &mut stack.use_call_arg_out_dest();
|
||||
let mut output = vec![];
|
||||
|
||||
for result in self.rest_iter_flattened(starting_pos, |expr| {
|
||||
self.rest_iter_flattened(starting_pos, |expr| {
|
||||
eval_expression::<WithoutDebug>(engine_state, stack, expr)
|
||||
})? {
|
||||
output.push(FromValue::from_value(result)?);
|
||||
}
|
||||
|
||||
Ok(output)
|
||||
})?
|
||||
.into_iter()
|
||||
.map(FromValue::from_value)
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn opt<T: FromValue>(
|
||||
|
Reference in New Issue
Block a user