about summary refs log tree commit diff
path: root/src/liballoc/lib.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-10 23:26:36 -0700
committerGitHub <noreply@github.com>2020-07-10 23:26:36 -0700
commit2da709ea212871674800c3808e548d756cdca249 (patch)
treeebd7d84dffbc08f5fa15c702927aa2702141d26c /src/liballoc/lib.rs
parent427ef98bc3ed87190f389bebc64cc76604c0213a (diff)
parenta1a19cbbe1c17dc03ca689db002181c9bd95f529 (diff)
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.
Diffstat (limited to 'src/liballoc/lib.rs')
-rw-r--r--src/liballoc/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 79bfd57a00f..2ec777ac85c 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -89,6 +89,7 @@
 #![feature(const_in_array_repeat_expressions)]
 #![cfg_attr(bootstrap, feature(const_if_match))]
 #![feature(cow_is_borrowed)]
+#![feature(deque_range)]
 #![feature(dispatch_from_dyn)]
 #![feature(core_intrinsics)]
 #![feature(container_error_extra)]