Skip to content

Commit

Permalink
Merge pull request #348 from cuviper/clone-intoiter
Browse files Browse the repository at this point in the history
Derive `Clone` for `{map,set}::IntoIter`
  • Loading branch information
cuviper authored Sep 16, 2024
2 parents 6328647 + 5d9cb11 commit 15518f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/map/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ impl<K, V> 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<K, V> {
iter: vec::IntoIter<Bucket<K, V>>,
}
Expand Down
1 change: 1 addition & 0 deletions src/set/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ impl<T> 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<T> {
iter: vec::IntoIter<Bucket<T>>,
}
Expand Down

0 comments on commit 15518f3

Please sign in to comment.