Skip to content
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

iter() behaviour for XxxMap #121

Closed
hh9527 opened this issue Mar 4, 2020 · 2 comments
Closed

iter() behaviour for XxxMap #121

hh9527 opened this issue Mar 4, 2020 · 2 comments

Comments

@hh9527
Copy link

hh9527 commented Mar 4, 2020

HashMap::iter() should yield (&K, &V), not &V.

and

HashMap::iter_mut()

So does OrdMap

As same as in std.

@bodil
Copy link
Owner

bodil commented Mar 4, 2020

But the HashMap iterator currently yields &(K, V), not &V?

The mutable iterator only yields &mut V, though, I agree it'd be better if it yielded (&K, &mut V).

@hh9527
Copy link
Author

hh9527 commented Mar 9, 2020

sorry, my mistake. only iter_mut()

@bodil bodil closed this as completed in 1b5e2ff Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants