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

update iterator types and fn pointers to Rust master #39

Merged
merged 1 commit into from
Dec 23, 2014
Merged

update iterator types and fn pointers to Rust master #39

merged 1 commit into from
Dec 23, 2014

Conversation

apasel422
Copy link
Contributor

No description provided.

cgaebel pushed a commit that referenced this pull request Dec 23, 2014
update iterator types and fn pointers to Rust master
@cgaebel cgaebel merged commit a5c17e7 into Gankra:master Dec 23, 2014
@apasel422 apasel422 deleted the fixes branch December 23, 2014 22:41
@@ -196,6 +196,7 @@ impl<T> TrieMap<T> {
#[unstable = "matches collection reform specification, waiting for dust to settle"]
pub fn keys<'r>(&'r self) -> Keys<'r, T> {
fn first<A, B>((a, _): (A, B)) -> A { a }
let first: fn((uint, &'r T)) -> uint = first; // coerce to fn pointer
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Because the latest rustc is the worst. See: rustc:src/libstd/collections/hash/map.rs search for fn keys

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a permanent change? It looks ridiculous.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No idea. But I agree that it's ridiculous. I miss the old days where this just looked like self.iter().map(|(_, b)| b)

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.

None yet

3 participants