Skip to content

Commit

Permalink
core: impl Clone for option::IntoIter and iter::Once
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrik Sverdrup committed Jun 10, 2015
1 parent 6daf1dc commit c00b859
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libcore/iter.rs
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/libcore/option.rs
Expand Up @@ -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> }

Expand Down

0 comments on commit c00b859

Please sign in to comment.