core: impl Clone for option::IntoIter and iter::Once

This commit is contained in:
Ulrik Sverdrup 2015-06-10 20:57:39 +02:00
parent 6daf1dcb80
commit c00b859c9d
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> }