diff options
| author | Mateusz Mikuła <matti@marinelayer.io> | 2019-09-05 13:30:30 +0200 |
|---|---|---|
| committer | Mateusz Mikuła <mati865@gmail.com> | 2019-10-22 19:23:10 +0200 |
| commit | 95c06a29707c8b2f811495c05b0cd009743e29de (patch) | |
| tree | 78374dc1757b47bc5c54e9095da0e66395c889c0 /src/liballoc | |
| parent | dffc1b32820d740b3e2b3cf8e98b4d0511a62163 (diff) | |
| download | rust-95c06a29707c8b2f811495c05b0cd009743e29de.tar.gz rust-95c06a29707c8b2f811495c05b0cd009743e29de.zip | |
Apply clippy::needless_return suggestions
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/vec_deque.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/str.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/sync.rs | 2 |
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 } } } |
