Skip to content

Commit 8961468

Browse files
Update src/uu/sort/src/sort.rs
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
1 parent 5a2adfb commit 8961468

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/uu/sort/src/sort.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,13 +1846,13 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
18461846
uucore::clap_localization::handle_clap_result_with_exit_code(uu_app(), processed_args, 2)?;
18471847

18481848
// Prevent -o/--output to be specified multiple times
1849-
if let Some(outputs) = matches.get_many::<OsString>(options::OUTPUT) {
1850-
let mut iter = outputs.into_iter();
1851-
if let Some(first) = iter.next() {
1852-
if iter.any(|out| out != first) {
1853-
return Err(SortError::MultipleOutputFiles.into());
1854-
}
1855-
}
1849+
if let Some(mut outputs) = matches.get_many::<OsString>(options::OUTPUT) {
1850+
if let Some(first) = outputs.next() {
1851+
if outputs.any(|out| out != first) {
1852+
return Err(SortError::MultipleOutputFiles.into());
1853+
}
1854+
}
1855+
}
18561856
}
18571857

18581858
settings.debug = matches.get_flag(options::DEBUG);

0 commit comments

Comments
 (0)