Why does BTreeSet not implement Bit*_Assign?

I'd love to do something like:

let mut a = BTreeSet::from_iter(0..10);
let b = BTreeSet::from_iter(8..15);
a &= &b;

Currently, I have to resort to this:

a = &a & &b;

which is not very pleasing.


Migrated from:

6 Likes

Well?

I think it would be a great idea having the bitassign operators on btreeset and hash set.

your first post with just a link is kind of missing an explanation, so that could be why there hasn't been much response except for five likes.

3 Likes

Maybe you could directly fire an issue at the GitHub repo? Or even create an RFC for this

This seems like one of those minor libs changes where you could just open a PR without going through the RFC process

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.