Good morning rustlers! PR 28034 has now merged which means that the semantics of the BufRead::lines and str::lines methods are subtly changing. The change will be in the next nightly build and will soon make its way on to the beta channel.

The change in semantics is that a CRLF is now interpreted as a line separator in addition to just a bare newline. For example, this code will change behavior:

let a = "line1\r

line2

line3"; println!("{:?}", a.lines().collect::<Vec<_>>());

Currently on stable and beta Rust this will print

["line1\r", "line2", "line3"]

However once the next nightly is produced it will print:

["line1", "line2", "line3"]

Notice that the carriage return ( \r ) is present in the yielded strings today on stable but it is not present on the updated compiler.

More background for this change can be found on RFC 1212 and if you run into any problems with this please let us know!