Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Freaky committed Apr 7, 2018
1 parent 2600c08 commit 5743813
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/line_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,24 @@ impl<T: io::Read> LineReader<T> {
Ok(n) => {
r = n;
break;
},
}
Err(ref e) if e.kind() == ErrorKind::Interrupted => {
continue;
},
Err(e) => {
return Err(e)
},
}
Err(e) => return Err(e),
}
}

self.end_of_buffer += r;

// Find the new last end of line
self.end_of_complete = cmp::min(
1 + memrchr(self.delimiter, &self.buf[..self.end_of_buffer]).unwrap_or(self.end_of_buffer),
1
+ memrchr(self.delimiter, &self.buf[..self.end_of_buffer])
.unwrap_or(self.end_of_buffer),
self.end_of_buffer,
);

Ok(r > 0)
}

}

0 comments on commit 5743813

Please sign in to comment.