]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Rollup merge of #69706 - cuviper:subslice-methods, r=Centril
authorMazdak Farrokhzad <twingoow@gmail.com>
Sat, 7 Mar 2020 07:15:29 +0000 (08:15 +0100)
committerGitHub <noreply@github.com>
Sat, 7 Mar 2020 07:15:29 +0000 (08:15 +0100)
commitb25fb9e79bc52f4746c966a7ade7bb93b67c4aa0
tree16bec1ee2458b9dfcaeb11e9937d2082df491d0f
parentba1f6cbb00511becb2ab0f99d1e06388ad3dbf95
parent53be0ccbc913f05c81f1762fd60512e3f57ab5c7
Rollup merge of #69706 - cuviper:subslice-methods, r=Centril

Use subslice patterns in slice methods

For all of the methods that pick off the first or last element, we can
use subslice patterns to implement them directly, rather than relying on
deeper indexing function calls. At a minimum, this means the generated
code will rely less on inlining for performance, but in some cases it
also optimizes better.