use char instead of &str for single char patterns
This commit is contained in:
@@ -2396,9 +2396,9 @@ impl<B: BufRead> Iterator for Lines<B> {
|
||||
match self.buf.read_line(&mut buf) {
|
||||
Ok(0) => None,
|
||||
Ok(_n) => {
|
||||
if buf.ends_with("\n") {
|
||||
if buf.ends_with('\n') {
|
||||
buf.pop();
|
||||
if buf.ends_with("\r") {
|
||||
if buf.ends_with('\r') {
|
||||
buf.pop();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user