Add BitXor to EnumSet.
This commit is contained in:
parent
6ee56c9a5f
commit
01b599eb34
@ -16,7 +16,6 @@
|
||||
use core::prelude::*;
|
||||
use core::fmt;
|
||||
|
||||
// FIXME(conventions): implement BitXor
|
||||
// FIXME(contentions): implement union family of methods? (general design may be wrong here)
|
||||
// FIXME(conventions): implement len
|
||||
|
||||
@ -196,6 +195,12 @@ impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E:CLike> BitXor<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
|
||||
fn bitxor(&self, e: &EnumSet<E>) -> EnumSet<E> {
|
||||
EnumSet {bits: self.bits ^ e.bits}
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator over an EnumSet
|
||||
pub struct Items<E> {
|
||||
index: uint,
|
||||
|
Loading…
Reference in New Issue
Block a user