From 9e8b33e811bca10e23bb9e80445122a8ab31225c Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 10 Oct 2017 10:18:34 -0700 Subject: [PATCH] core: derive Clone for result::IntoIter It appears to be a simple oversight that `result::IntoIter` doesn't implement `Clone` (where `T: Clone`). We do already have `Clone` for `result::Iter`, as well as the similar `option::IntoIter` and `Iter`. --- src/libcore/result.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/result.rs b/src/libcore/result.rs index ea064ca5c39fe..db5bffced10cc 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -1060,7 +1060,7 @@ unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {} /// [`Result`]: enum.Result.html /// [`into_iter`]: ../iter/trait.IntoIterator.html#tymethod.into_iter /// [`IntoIterator`]: ../iter/trait.IntoIterator.html -#[derive(Debug)] +#[derive(Clone, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub struct IntoIter { inner: Option }