Skip to content

Commit 780765d

Browse files
committed
fix up contains and intersection docs
1 parent 97b7607 commit 780765d

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ macro_rules! __impl_bitflags {
676676
pub fn from_name($name: &str) -> $crate::__private::core::option::Option<Self>
677677
$from_name_body
678678

679-
/// Whether all bits in this flags value are unset.
679+
/// Whether all bits in `self` are unset.
680680
#[inline]
681681
pub const fn is_empty(&$self) -> bool
682682
$is_empty_body
@@ -686,12 +686,12 @@ macro_rules! __impl_bitflags {
686686
pub const fn is_all(&$self) -> bool
687687
$is_all_body
688688

689-
/// Whether any set bits in `self` are also set in `other`.
689+
/// Whether any set bits in `other` are also set in `self`.
690690
#[inline]
691691
pub const fn intersects(&$self, $other: Self) -> bool
692692
$intersects_body
693693

694-
/// Whether all set bits in `self` are also set in `other`.
694+
/// Whether all set bits in `other` are also set in `self`.
695695
#[inline]
696696
pub const fn contains(&$self, $other: Self) -> bool
697697
$contains_body

src/traits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,15 +245,15 @@ pub trait Flags: Sized + 'static {
245245
Self::all().bits() | self.bits() == self.bits()
246246
}
247247

248-
/// Whether any set bits in `self` are also set in `other`.
248+
/// Whether any set bits in `other` are also set in `self`.
249249
fn intersects(&self, other: Self) -> bool
250250
where
251251
Self: Sized,
252252
{
253253
self.bits() & other.bits() != Self::Bits::EMPTY
254254
}
255255

256-
/// Whether all set bits in a `self` value are also set in `other`.
256+
/// Whether all set bits in `other` are also set in `self`.
257257
fn contains(&self, other: Self) -> bool
258258
where
259259
Self: Sized,

0 commit comments

Comments
 (0)