From 5d9cb11a68e496bfdb3191923d083f0d6e99cf84 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 16 Sep 2024 16:37:02 -0700 Subject: [PATCH] Derive `Clone` for `{map,set}::IntoIter` --- src/map/iter.rs | 1 + src/set/iter.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/map/iter.rs b/src/map/iter.rs index 9bbf9d9f..2943f18a 100644 --- a/src/map/iter.rs +++ b/src/map/iter.rs @@ -221,6 +221,7 @@ impl Default for IterMut2<'_, K, V> { /// /// This `struct` is created by the [`IndexMap::into_iter`] method /// (provided by the [`IntoIterator`] trait). See its documentation for more. +#[derive(Clone)] pub struct IntoIter { iter: vec::IntoIter>, } diff --git a/src/set/iter.rs b/src/set/iter.rs index 3f8033c2..31982760 100644 --- a/src/set/iter.rs +++ b/src/set/iter.rs @@ -88,6 +88,7 @@ impl Default for Iter<'_, T> { /// /// This `struct` is created by the [`IndexSet::into_iter`] method /// (provided by the [`IntoIterator`] trait). See its documentation for more. +#[derive(Clone)] pub struct IntoIter { iter: vec::IntoIter>, }