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

add a Set trait #4554

Merged
merged 2 commits into from
Jan 20, 2013
Merged

add a Set trait #4554

merged 2 commits into from
Jan 20, 2013

Conversation

thestinger
Copy link
Contributor

Closes #2640, and now that () is zero-size it makes the most sense to just implement sets as (opaque) adaptors on top of map types.

I haven't added map::HashSet because that module needs a lot of work first. It doesn't use explicit self, and the mutability is all messed up (and will require a lot of porting). I think I'll just add a new Map trait to the container module and throw out most of map after converting everything to the new trait.

@catamorphism
Copy link
Contributor

Great, thanks! I assume that adding intersection, union and complement will be future work (for someone :-)

catamorphism added a commit that referenced this pull request Jan 20, 2013
@catamorphism catamorphism merged commit b86c90b into rust-lang:incoming Jan 20, 2013
@thestinger thestinger deleted the set branch January 20, 2013 21:47
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.

2 participants