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

Implement BitOps for TreeSet #19561

Merged
merged 1 commit into from
Dec 8, 2014
Merged

Implement BitOps for TreeSet #19561

merged 1 commit into from
Dec 8, 2014

Conversation

csouth3
Copy link
Contributor

@csouth3 csouth3 commented Dec 5, 2014

Implement the BitOr, BitAnd, BitXor, and Sub traits from std::ops for TreeSet. The behavior of these operator overloads is consistent with RFC 235.

r? @gankro

assert_eq!(v, vec![11, 22, 33, 40, 42]);
}

#[test]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason you went for slightly more complex tests than you used for TrieSet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No particularly strong reason, I actually just pulled these numbers straight from the tests for union/intersection/{symmetric} difference for TreeSet since they were easily accessible/in the same file. Would you like me to dial them back a little?

Copy link
Contributor

Choose a reason for hiding this comment

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

Eh, should be fine.

@Gankra Gankra mentioned this pull request Dec 5, 2014
@csouth3
Copy link
Contributor Author

csouth3 commented Dec 6, 2014

@gankro Here is the make check-docs approved™ doctests and the stability messages!

bors added a commit that referenced this pull request Dec 8, 2014
Implement the `BitOr`, `BitAnd`, `BitXor`, and `Sub` traits from `std::ops` for TreeSet.  The behavior of these operator overloads is consistent with [RFC 235](https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#combinations).

r? @gankro
@bors bors closed this Dec 8, 2014
@bors bors merged commit da50db0 into rust-lang:master Dec 8, 2014
@csouth3 csouth3 deleted the treeset-bitops branch December 8, 2014 02:24
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