mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
join: minor review points
This commit is contained in:
+3
-7
@@ -123,12 +123,8 @@ impl State {
|
||||
/// Move to the next line, if any.
|
||||
fn next_line(&mut self) {
|
||||
match self.read_line() {
|
||||
Some(line) => {
|
||||
self.seq[0] = line;
|
||||
}
|
||||
None => {
|
||||
self.seq.clear();
|
||||
}
|
||||
Some(line) => self.seq[0] = line,
|
||||
None => self.seq.clear()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +193,7 @@ impl State {
|
||||
|
||||
fn read_line(&mut self) -> Option<Line> {
|
||||
match self.lines.next() {
|
||||
Some(value) => Some(Line::new(value.expect("error reading file"))),
|
||||
Some(value) => Some(Line::new(crash_if_err!(1, value))),
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user