Rollup merge of #26189 - bluss:iter-once-clone, r=Gankro

core: impl Clone for option::IntoIter and iter::Once
This commit is contained in:
Manish Goregaokar 2015-06-11 12:50:53 +05:30
commit ea4949d449
2 changed files with 2 additions and 0 deletions

View File

@ -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>

View File

@ -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> }