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:
parent
a04a77a477
commit
3aa63ad9dd
1 changed files with 3 additions and 7 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue