1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

comm: fix EOF detection

This commit is contained in:
Michael Gehring 2015-11-28 20:16:19 +01:00
parent 0d8b6cb73c
commit 14b1313eaf

View file

@ -72,6 +72,7 @@ fn comm(a: &mut LineReader, b: &mut LineReader, opts: &getopts::Matches) {
(false, true) => Ordering::Greater,
(true , false) => Ordering::Less,
(true , true) => match(&na, &nb) {
(&Ok(0), &Ok(0)) => break,
(&Ok(0), _) => Ordering::Greater,
(_, &Ok(0)) => Ordering::Less,
_ => ra.cmp(&rb),