Skip to content

Commit

Permalink
docs: Add doc-alias to set and unset
Browse files Browse the repository at this point in the history
The other two major bitflag crates (`bitflags`, `enumflags2`) uses `insert` and `remove` instead
  • Loading branch information
GrayJack committed Nov 17, 2024
1 parent 7fa2b11 commit 3709c2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,14 @@ fn bitflag_impl(attr: TokenStream, item: TokenStream) -> Result<TokenStream> {

/// Set the flags in `other` in the value.
#[inline]
#[doc(alias = "insert")]
#vis fn set(&mut self, other: Self) {
self.0 = self.and(other).0
}

/// Unset the flags in `other` in the value.
#[inline]
#[doc(alias = "remove")]
#vis fn unset(&mut self, other: Self) {
self.0 = self.difference(other).0
}
Expand Down

0 comments on commit 3709c2d

Please sign in to comment.