diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-22 00:20:58 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-22 00:35:25 +0100 |
| commit | 74d68ea7ebe2085bba2758ccce366f1fa4fc6210 (patch) | |
| tree | 164b41576142a0d0476b1ec3c8c325abe260c03f /src/liballoc | |
| parent | 3599fd389de25af78a4616015fa937ff3aeb661a (diff) | |
| download | rust-74d68ea7ebe2085bba2758ccce366f1fa4fc6210.tar.gz rust-74d68ea7ebe2085bba2758ccce366f1fa4fc6210.zip | |
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) } } |
