Rollup merge of #26189 - bluss:iter-once-clone, r=Gankro
core: impl Clone for option::IntoIter and iter::Once
This commit is contained in:
commit
ea4949d449
@ -3077,6 +3077,7 @@ pub fn empty<T>() -> Empty<T> {
|
||||
}
|
||||
|
||||
/// An iterator that yields an element exactly once.
|
||||
#[derive(Clone)]
|
||||
#[unstable(feature="iter_once", reason = "new addition")]
|
||||
pub struct Once<T> {
|
||||
inner: ::option::IntoIter<T>
|
||||
|
@ -865,6 +865,7 @@ impl<'a, A> DoubleEndedIterator for IterMut<'a, A> {
|
||||
impl<'a, A> ExactSizeIterator for IterMut<'a, A> {}
|
||||
|
||||
/// An iterator over the item contained inside an Option.
|
||||
#[derive(Clone)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct IntoIter<A> { inner: Item<A> }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user