about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-16 16:34:30 +0200
committerGitHub <noreply@github.com>2020-04-16 16:34:30 +0200
commit294f9f30cdaf63bfc608199299b09497cf325429 (patch)
tree719940556cf9c2ad70a683aba0d2539b26ef5d10 /src/liballoc
parent7da24a2287d9ca2886f740a67ddb531d2243e218 (diff)
parent3837df2992354d4d08f6c1bc63311bdedb34cfb1 (diff)
downloadrust-294f9f30cdaf63bfc608199299b09497cf325429.tar.gz
rust-294f9f30cdaf63bfc608199299b09497cf325429.zip
Rollup merge of #71179 - matthiaskrgr:cl6ppy, r=Dylan-DPC
fix more clippy warnings
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/vec.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index 7ef281ff208..b4a9da84787 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -971,7 +971,7 @@ impl<T> Vec<T> {
         }
 
         let len = self.len();
-        if !(index < len) {
+        if index >= len {
             assert_failed(index, len);
         }
         unsafe {
@@ -1010,7 +1010,7 @@ impl<T> Vec<T> {
         }
 
         let len = self.len();
-        if !(index <= len) {
+        if index > len {
             assert_failed(index, len);
         }
 
@@ -1058,7 +1058,7 @@ impl<T> Vec<T> {
         }
 
         let len = self.len();
-        if !(index < len) {
+        if index >= len {
             assert_failed(index, len);
         }
         unsafe {
@@ -1331,10 +1331,10 @@ impl<T> Vec<T> {
             panic!("end drain index (is {}) should be <= len (is {})", end, len);
         }
 
-        if !(start <= end) {
+        if start > end {
             start_assert_failed(start, end);
         }
-        if !(end <= len) {
+        if end > len {
             end_assert_failed(end, len);
         }
 
@@ -1432,7 +1432,7 @@ impl<T> Vec<T> {
             panic!("`at` split index (is {}) should be <= len (is {})", at, len);
         }
 
-        if !(at <= self.len()) {
+        if at > self.len() {
             assert_failed(at, self.len());
         }