about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-02-28 17:53:10 +0000
committerbors <bors@rust-lang.org>2020-02-28 17:53:10 +0000
commit0eb878d2aa6e3a1cb315f3f328681b26bb4bffdb (patch)
treed04ae2e07f7382e6437a0d069e301592864cb2e7 /src/libstd
parenteaa02f599f651246d5d1b99e7a4c6fa8d04bc9dc (diff)
parent13e4c6c51f7e239a429456dc62ba694219e591f9 (diff)
Auto merge of #69555 - Centril:rollup-e53lxz4, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #68989 (Update RELEASES.md for 1.42.0)
 - #69340 (instantiate_value_path: on `SelfCtor`, avoid unconstrained tyvars)
 - #69384 (parser: `token` -> `normalized_token`, `nonnormalized_token` -> `token`)
 - #69452 (typeck: use `Pattern` obligation cause more for better diagnostics)
 - #69481 (use char instead of &str for single char patterns)
 - #69522 (error_derive_forbidden_on_non_adt: be more graceful)
 - #69538 (Stabilize `boxed_slice_try_from`)
 - #69539 (late resolve, visit_fn: bail early if there's no body.)
 - #69541 (Remove unneeded calls to format!())
 - #69547 (remove redundant clones, references to operands, explicit boolean comparisons and filter(x).next() calls.)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 67b382c7a84..a50dd9575de 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -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();
                     }
                 }