Remove rest_args() from evaluated CommandArgs (#3449)

It was too error prone when positional arguments were used with the rest
arguments. Now, you need to explicitly state from which position you
want to count the rest args (e.g., `rest(0)`).
This commit is contained in:
Jakub Žádník
2021-05-20 01:26:23 +03:00
committed by GitHub
parent e2973d2176
commit 3075e2cfbf
23 changed files with 22 additions and 26 deletions

View File

@ -201,10 +201,6 @@ impl EvaluatedCommandArgsWithoutInput {
}
}
pub fn rest_args<T: FromValue>(&self) -> Result<Vec<T>, ShellError> {
self.rest(0)
}
pub fn rest<T: FromValue>(&self, starting_pos: usize) -> Result<Vec<T>, ShellError> {
let mut output = vec![];