about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-03-22 15:48:41 +0100
committerGitHub <noreply@github.com>2020-03-22 15:48:41 +0100
commit8fe8bad96b88cf981458e836e6866ddc7966cecb (patch)
tree8b6472e894c409e9d728067bbcf2673d406e2fb2 /src/liballoc
parente5d34766510fd61b07012103bf6e7b83f963a33f (diff)
parent74d68ea7ebe2085bba2758ccce366f1fa4fc6210 (diff)
downloadrust-8fe8bad96b88cf981458e836e6866ddc7966cecb.tar.gz
rust-8fe8bad96b88cf981458e836e6866ddc7966cecb.zip
Rollup merge of #70254 - matthiaskrgr:cl4ppy, r=Centril
couple more clippy fixes (let_and_return, if_same_then_else)

* summarize if-else-code with identical blocks (clippy::if_same_then_else)
* don't create variable bindings just to return the bound value immediately (clippy::let_and_return)
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/slice.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index 7b83658fca6..d8fc1faca3a 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -145,8 +145,7 @@ mod hack {
         unsafe {
             let len = b.len();
             let b = Box::into_raw(b);
-            let xs = Vec::from_raw_parts(b as *mut T, len, len);
-            xs
+            Vec::from_raw_parts(b as *mut T, len, len)
         }
     }