mirror of
https://github.com/nushell/nushell.git
synced 2025-07-07 18:07:02 +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,4 +1,3 @@
|
||||
use super::util::get_rest_for_glob_pattern;
|
||||
use crate::{DirBuilder, DirInfo, FileInfo};
|
||||
#[allow(deprecated)]
|
||||
use nu_engine::{command_prelude::*, current_dir};
|
||||
@ -101,7 +100,7 @@ impl Command for Du {
|
||||
#[allow(deprecated)]
|
||||
let current_dir = current_dir(engine_state, stack)?;
|
||||
|
||||
let paths = get_rest_for_glob_pattern(engine_state, stack, call, 0)?;
|
||||
let paths = call.rest::<Spanned<NuGlob>>(engine_state, stack, 0)?;
|
||||
let paths = if !call.has_positional_args(stack, 0) {
|
||||
None
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user