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

join: minor review points

This commit is contained in:
Konstantin Pospelov 2017-12-16 16:11:39 +03:00
parent a04a77a477
commit 3aa63ad9dd

View file

@ -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,
}
}