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

Small cleanups in HashMap based off of new rust features. #19935

Merged
merged 1 commit into from
Dec 17, 2014

Conversation

cgaebel
Copy link
Contributor

@cgaebel cgaebel commented Dec 16, 2014

Full(bucket) => bucket
};

if bucket.hash() == hash {
let found_match = {
Copy link
Contributor

Choose a reason for hiding this comment

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

minor concern that we're losing some semantics here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how so?

Copy link
Contributor

Choose a reason for hiding this comment

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

In isolation, we've replaced the helpful name found_match with some more opaque if statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can add a comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

I love comments! \o/

@Gankra
Copy link
Contributor

Gankra commented Dec 16, 2014

r=me with squash

@cgaebel
Copy link
Contributor Author

cgaebel commented Dec 16, 2014

bors added a commit that referenced this pull request Dec 17, 2014
Small cleanups in HashMap based off of new rust features.

Reviewed-by: Gankro
bors referenced this pull request Dec 17, 2014
Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the iterators of `VecMap` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 17, 2014
@bors bors merged commit c42e2f6 into rust-lang:master Dec 17, 2014
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.

3 participants