Skip to content

Commit db80da1

Browse files
committed
Auto merge of #45179 - cuviper:result-intoiter-clone, r=BurntSushi
core: derive Clone for result::IntoIter It appears to be a simple oversight that `result::IntoIter<T>` doesn't implement `Clone` (where `T: Clone`). We do already have `Clone` for `result::Iter`, as well as the similar `option::IntoIter` and `Iter`.
2 parents 90691c8 + 9e8b33e commit db80da1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/result.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {}
10601060
/// [`Result`]: enum.Result.html
10611061
/// [`into_iter`]: ../iter/trait.IntoIterator.html#tymethod.into_iter
10621062
/// [`IntoIterator`]: ../iter/trait.IntoIterator.html
1063-
#[derive(Debug)]
1063+
#[derive(Clone, Debug)]
10641064
#[stable(feature = "rust1", since = "1.0.0")]
10651065
pub struct IntoIter<T> { inner: Option<T> }
10661066

0 commit comments

Comments
 (0)