diff --git a/src/uu/uniq/src/uniq.rs b/src/uu/uniq/src/uniq.rs index a885c4fcf94..6037a662249 100644 --- a/src/uu/uniq/src/uniq.rs +++ b/src/uu/uniq/src/uniq.rs @@ -82,11 +82,7 @@ impl Uniq { let mut next_meta = LineMeta::default(); let mut line_out = Vec::with_capacity(1024); - loop { - if !Self::read_line(&mut reader, &mut next_buf, line_terminator)? { - break; - } - + while Self::read_line(&mut reader, &mut next_buf, line_terminator)? { self.build_meta(&next_buf, &mut next_meta); if self.keys_are_equal(¤t_buf, ¤t_meta, &next_buf, &next_meta) {