]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #74099 - jonhoo:deque-range, r=dtolnay
authorManish Goregaokar <manishsmail@gmail.com>
Sat, 11 Jul 2020 06:26:36 +0000 (23:26 -0700)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2020 06:26:36 +0000 (23:26 -0700)
commit2da709ea212871674800c3808e548d756cdca249
treeebd7d84dffbc08f5fa15c702927aa2702141d26c
parent427ef98bc3ed87190f389bebc64cc76604c0213a
parenta1a19cbbe1c17dc03ca689db002181c9bd95f529
Rollup merge of #74099 - jonhoo:deque-range, r=dtolnay

Add VecDeque::range* methods

This patch adds `VecDeque::range` and `VecDeque::range_mut` to provide
iterators over a sub-range of a `VecDeque`. This behavior can be
emulated with `skip` and `take`, but directly providing a `Range` is
more ergonomic. This also partially makes up for `VecDeque`'s lack of
`SliceIndex` support.