diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-22 15:48:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-22 15:48:41 +0100 |
| commit | 8fe8bad96b88cf981458e836e6866ddc7966cecb (patch) | |
| tree | 8b6472e894c409e9d728067bbcf2673d406e2fb2 /src/liballoc | |
| parent | e5d34766510fd61b07012103bf6e7b83f963a33f (diff) | |
| parent | 74d68ea7ebe2085bba2758ccce366f1fa4fc6210 (diff) | |
| download | rust-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.rs | 3 |
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) } } |
