mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
cp: use get_many instead of remove_many from clap
This commit is contained in:
parent
7ffc16c31d
commit
a6e104fc98
1 changed files with 2 additions and 2 deletions
|
@ -796,7 +796,7 @@ pub fn uu_app() -> Command {
|
||||||
|
|
||||||
#[uucore::main]
|
#[uucore::main]
|
||||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
let mut matches = uu_app().try_get_matches_from(args)?;
|
let matches = uu_app().try_get_matches_from(args)?;
|
||||||
|
|
||||||
let options = Options::from_matches(&matches)?;
|
let options = Options::from_matches(&matches)?;
|
||||||
|
|
||||||
|
@ -808,7 +808,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
let paths: Vec<PathBuf> = matches
|
let paths: Vec<PathBuf> = matches
|
||||||
.remove_many::<OsString>(options::PATHS)
|
.get_many::<OsString>(options::PATHS)
|
||||||
.map(|v| v.map(PathBuf::from).collect())
|
.map(|v| v.map(PathBuf::from).collect())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue