Skip to content

Add Clone and Debug impls to map iterators #1264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2025
Merged

Conversation

xlambein
Copy link
Contributor

@xlambein xlambein commented May 31, 2025

I've noticed that the iterators for Map are missing some traits that are implemented by their counterpart in std::collections and indexmap: namely, Clone and Debug. AFAICT, there's no reason for those to be missing, and they can be useful. I found myself missing Clone on Iter, for example.

Initially, I'd included Default among these, but it's not supported on Rust 1.65 and older.

@xlambein xlambein changed the title Add Clone, Debug and Default impls to map iterators Add Clone and Default impls to map iterators May 31, 2025
@xlambein xlambein changed the title Add Clone and Default impls to map iterators Add Clone and Debug impls to map iterators May 31, 2025
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay dtolnay merged commit ec190d6 into serde-rs:master Aug 19, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants