1
Fork 0

use char instead of &str for single char patterns

This commit is contained in:
Matthias Krüger 2020-02-26 13:03:46 +01:00
parent a8437cf213
commit 7c84ba1124
30 changed files with 44 additions and 44 deletions

View file

@ -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();
}
}