1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

sort: use values_of

This commit is contained in:
Michael Debertol 2021-06-14 11:39:26 +02:00
parent af6e92e012
commit 13458b4806

View file

@ -1272,11 +1272,11 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
settings.separator = Some(separator.chars().next().unwrap()) settings.separator = Some(separator.chars().next().unwrap())
} }
if matches.is_present(options::KEY) { if let Some(values) = matches.values_of(options::KEY) {
for key in &matches.args[options::KEY].vals { for value in values {
settings settings
.selectors .selectors
.push(FieldSelector::parse(&key.to_string_lossy(), &settings)); .push(FieldSelector::parse(value, &settings));
} }
} }