about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-28 09:12:04 +0000
committerbors <bors@rust-lang.org>2019-07-28 09:12:04 +0000
commit0cfb2f7fbda1d27e12913d21d1c8e56a4133dbe1 (patch)
tree5f511147f1c0f419f26fb362c24710e1cd459ec6 /src/libcore
parent9a239ef4ded03d155c72b68b5a2dd7aff013e141 (diff)
parent370aa19f28ea6d42f1aaf6de39a294e5e4e9aab7 (diff)
downloadrust-0cfb2f7fbda1d27e12913d21d1c8e56a4133dbe1.tar.gz
rust-0cfb2f7fbda1d27e12913d21d1c8e56a4133dbe1.zip
Auto merge of #63074 - Centril:rollup-k1a8z0n, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #62550 (Implement RFC 2707 + Parser recovery for range patterns)
 - #62759 (Actually add rustc-guide to toolstate, don't fail builds for the guide)
 - #62806 (Fix few Clippy warnings)
 - #62974 (bump crossbeam-epoch dependency)
 - #63051 (Avoid ICE when referencing desugared local binding in borrow error)
 - #63061 (In which we constantly improve the Vec(Deque) array PartialEq impls)
 - #63067 (Add test for issue-50900)
 - #63071 (Allow rustbot to add `F-*` + `requires-nightly`.)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/alloc.rs4
-rw-r--r--src/libcore/str/lossy.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs
index 487f3b76fc7..5d0333d5226 100644
--- a/src/libcore/alloc.rs
+++ b/src/libcore/alloc.rs
@@ -827,11 +827,11 @@ pub unsafe trait Alloc {
         let old_size = layout.size();
 
         if new_size >= old_size {
-            if let Ok(()) = self.grow_in_place(ptr, layout.clone(), new_size) {
+            if let Ok(()) = self.grow_in_place(ptr, layout, new_size) {
                 return Ok(ptr);
             }
         } else if new_size < old_size {
-            if let Ok(()) = self.shrink_in_place(ptr, layout.clone(), new_size) {
+            if let Ok(()) = self.shrink_in_place(ptr, layout, new_size) {
                 return Ok(ptr);
             }
         }
diff --git a/src/libcore/str/lossy.rs b/src/libcore/str/lossy.rs
index b291579553a..e8f747f1a67 100644
--- a/src/libcore/str/lossy.rs
+++ b/src/libcore/str/lossy.rs
@@ -46,7 +46,7 @@ impl<'a> Iterator for Utf8LossyChunksIter<'a> {
     type Item = Utf8LossyChunk<'a>;
 
     fn next(&mut self) -> Option<Utf8LossyChunk<'a>> {
-        if self.source.len() == 0 {
+        if self.source.is_empty() {
             return None;
         }
 
@@ -141,7 +141,7 @@ impl fmt::Display for Utf8Lossy {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         // If we're the empty string then our iterator won't actually yield
         // anything, so perform the formatting manually
-        if self.bytes.len() == 0 {
+        if self.bytes.is_empty() {
             return "".fmt(f)
         }