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
2 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue