about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-03-01 17:39:05 +0000
committerbors <bors@rust-lang.org>2020-03-01 17:39:05 +0000
commitbeac68a88711a90346ec8b68e3baefbec62b3b0d (patch)
tree1b259905fed71996a78fd2f9c2e48310151c31c9 /src/liballoc
parent360e42de82152c4e1a6e70d2f228dd3748c50c8d (diff)
parentd3a5a5d20bb128dd08ac37717f6415baf80d5039 (diff)
downloadrust-beac68a88711a90346ec8b68e3baefbec62b3b0d.tar.gz
rust-beac68a88711a90346ec8b68e3baefbec62b3b0d.zip
Auto merge of #69612 - Dylan-DPC:rollup-f180gcc, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #69504 (Use assert_ne in hash tests)
 - #69554 (Cleanup e0374)
 - #69568 (Clarify explanation of Vec<T> 'fn resize')
 - #69569 (simplify boolean expressions)
 - #69577 (Clean up E0375 explanation)
 - #69598 (rustdoc: HTML escape crate version)
 - #69607 (Clean up E0376 explanation)

Failed merges:

r? @ghost
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/collections/binary_heap.rs4
-rw-r--r--src/liballoc/vec.rs5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/liballoc/collections/binary_heap.rs b/src/liballoc/collections/binary_heap.rs
index f38fe997b73..9908a304976 100644
--- a/src/liballoc/collections/binary_heap.rs
+++ b/src/liballoc/collections/binary_heap.rs
@@ -536,7 +536,7 @@ impl<T: Ord> BinaryHeap<T> {
             while child < end {
                 let right = child + 1;
                 // compare with the greater of the two children
-                if right < end && !(hole.get(child) > hole.get(right)) {
+                if right < end && hole.get(child) <= hole.get(right) {
                     child = right;
                 }
                 // if we are already in order, stop.
@@ -568,7 +568,7 @@ impl<T: Ord> BinaryHeap<T> {
             while child < end {
                 let right = child + 1;
                 // compare with the greater of the two children
-                if right < end && !(hole.get(child) > hole.get(right)) {
+                if right < end && hole.get(child) <= hole.get(right) {
                     child = right;
                 }
                 hole.move_to(child);
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index fc50d06b33c..3fd7be06fd4 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -1476,8 +1476,9 @@ impl<T: Clone> Vec<T> {
     /// difference, with each additional slot filled with `value`.
     /// If `new_len` is less than `len`, the `Vec` is simply truncated.
     ///
-    /// This method requires [`Clone`] to be able clone the passed value. If
-    /// you need more flexibility (or want to rely on [`Default`] instead of
+    /// This method requires `T` to implement [`Clone`],
+    /// in order to be able to clone the passed value.
+    /// If you need more flexibility (or want to rely on [`Default`] instead of
     /// [`Clone`]), use [`resize_with`].
     ///
     /// # Examples