about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-23 22:19:07 +0200
committerGitHub <noreply@github.com>2019-10-23 22:19:07 +0200
commit426c6cf84fd6230240abe5e2e9007fcc7d1cddff (patch)
tree43c4e608acb09219bd63e59d10a00d3661fe2cdb /src/liballoc
parent4a8c5b20c7772bc5342b83d4b0696ea216ef75a7 (diff)
parentbedbf3bacbff36a477dcf28523cbf6cab67e9e0a (diff)
downloadrust-426c6cf84fd6230240abe5e2e9007fcc7d1cddff.tar.gz
rust-426c6cf84fd6230240abe5e2e9007fcc7d1cddff.zip
Rollup merge of #64178 - mati865:clippy, r=scottmcm
More Clippy fixes for alloc, core and std

Continuation of https://github.com/rust-lang/rust/pull/63805
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/collections/vec_deque.rs2
-rw-r--r--src/liballoc/str.rs2
-rw-r--r--src/liballoc/sync.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs
index 0bf573f5e25..8f3dfabd888 100644
--- a/src/liballoc/collections/vec_deque.rs
+++ b/src/liballoc/collections/vec_deque.rs
@@ -1817,7 +1817,7 @@ impl<T> VecDeque<T> {
             }
         }
 
-        return elem;
+        elem
     }
 
     /// Splits the `VecDeque` into two at the given index.
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index 9231c2d3f1d..83816d8b954 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -456,7 +456,7 @@ impl str {
                 }
             }
         }
-        return s;
+        s
     }
 
     /// Converts a [`Box<str>`] into a [`String`] without copying or allocating.
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index 69f8f71197c..80d6c6e0d43 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -1638,7 +1638,7 @@ impl<T: ?Sized> Clone for Weak<T> {
             }
         }
 
-        return Weak { ptr: self.ptr };
+        Weak { ptr: self.ptr }
     }
 }