implement nth_back for Box
This commit is contained in:
parent
eac09088e1
commit
4837fb45ff
2 changed files with 4 additions and 0 deletions
|
|
@ -662,6 +662,9 @@ impl<I: DoubleEndedIterator + ?Sized> DoubleEndedIterator for Box<I> {
|
|||
fn next_back(&mut self) -> Option<I::Item> {
|
||||
(**self).next_back()
|
||||
}
|
||||
fn nth_back(&mut self, n: usize) -> Option<I::Item> {
|
||||
(**self).nth_back(n)
|
||||
}
|
||||
}
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for Box<I> {
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@
|
|||
#![feature(maybe_uninit)]
|
||||
#![feature(alloc_layout_extra)]
|
||||
#![feature(try_trait)]
|
||||
#![feature(iter_nth_back)]
|
||||
|
||||
// Allow testing this library
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue