Skip to content

Add a consume method to SmallIntMap #7679

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
Jul 12, 2013

Conversation

alexcrichton
Copy link
Member

This allows values to be moved out of a SmallIntMap

@thestinger
Copy link
Contributor

This could actually be an iterator object now like the consume iterator in the vec module.

@nikomatsakis
Copy link
Contributor

I'd go so far as to say should be.

@alexcrichton
Copy link
Member Author

I left it named consume, but it's an iterator now.

@thestinger thestinger closed this Jul 11, 2013
@thestinger thestinger reopened this Jul 11, 2013
@thestinger
Copy link
Contributor

@alexcrichton: this should use filter_map instead of filter, so it can yield (uint, &V) instead of (uint, Option<&V>)

There's a test that needs to be updated to use advance and tuple destructuring too, once that's done.

@alexcrichton
Copy link
Member Author

Oh wow that was definitely just a careless mistake...

@thestinger
Copy link
Contributor

@alexcrichton: no worries :)

@thestinger
Copy link
Contributor

Passed tests on all bots except a single mac one, where a git clone failed in the rustpkg tests. Just merging manually.

thestinger added a commit that referenced this pull request Jul 12, 2013
Add a `consume` method to SmallIntMap
@thestinger thestinger merged commit cc4baac into rust-lang:master Jul 12, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 28, 2021
add rust-lang#4546 test

changelog: none
fixed rust-lang#4546

I notice rust-lang#4546 was fixed some time, I just add the tests.
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

Successfully merging this pull request may close these issues.

4 participants