Skip to content

Commit c00b859

Browse files
author
Ulrik Sverdrup
committed
core: impl Clone for option::IntoIter and iter::Once
1 parent 6daf1dc commit c00b859

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/libcore/iter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3077,6 +3077,7 @@ pub fn empty<T>() -> Empty<T> {
30773077
}
30783078

30793079
/// An iterator that yields an element exactly once.
3080+
#[derive(Clone)]
30803081
#[unstable(feature="iter_once", reason = "new addition")]
30813082
pub struct Once<T> {
30823083
inner: ::option::IntoIter<T>

src/libcore/option.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ impl<'a, A> DoubleEndedIterator for IterMut<'a, A> {
865865
impl<'a, A> ExactSizeIterator for IterMut<'a, A> {}
866866

867867
/// An iterator over the item contained inside an Option.
868+
#[derive(Clone)]
868869
#[stable(feature = "rust1", since = "1.0.0")]
869870
pub struct IntoIter<A> { inner: Item<A> }
870871

0 commit comments

Comments
 (0)