]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #67725 - ssomers:into_key_slice_mut, r=RalfJung
authorYuki Okushi <huyuumi.dev@gmail.com>
Thu, 9 Jan 2020 19:18:34 +0000 (04:18 +0900)
committerGitHub <noreply@github.com>
Thu, 9 Jan 2020 19:18:34 +0000 (04:18 +0900)
Simplify into_key_slice_mut

Remove a rare and tiny but superfluous run-time check from into_key_slice_mut.

In #67459, I wrote that "`get_mut` [...] does visit `into_key_slice_mut`" and that was wrong. No function that operates on a map that (still) has a shared root ever dives into `into_key_slice_mut`.  So it's more clear to remove the (previously existing, and always incomplete) code it has for dealing with shared roots, as well as a petty performance improvement for those using exotically aligned key types.

~~Also, some testing of the `range` function initially added to #67686 but hardly related.~~

r? @RalfJung


Trivial merge