1
Fork 0
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:
Daniel Hofstetter 2025-06-16 16:24:32 +02:00
parent 7ffc16c31d
commit a6e104fc98

View file

@ -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();