autocommit 2022-03-26 22:58:30 CET
This commit is contained in:
parent
3b1b843821
commit
707ff6066c
28 changed files with 2307 additions and 707 deletions
|
|
@ -1,5 +1,6 @@
|
|||
pub trait BitflagsExt {
|
||||
fn contains(self, other: Self) -> bool;
|
||||
fn not_contains(self, other: Self) -> bool;
|
||||
fn intersects(self, other: Self) -> bool;
|
||||
}
|
||||
|
||||
|
|
@ -10,6 +11,10 @@ macro_rules! num {
|
|||
self & other == other
|
||||
}
|
||||
|
||||
fn not_contains(self, other: Self) -> bool {
|
||||
self & other != other
|
||||
}
|
||||
|
||||
fn intersects(self, other: Self) -> bool {
|
||||
self & other != 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue