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.

This seems like a perfectly reasonable feature request to me, but there might be some technical reason why it hasn’t been implemented. You might want to ask this on IRLO, where more of the language contributors hang out— If it turns out this is just an oversight, somebody there might add it to a future version.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.