Skip to content

Commit

Permalink
Use const fn for new
Browse files Browse the repository at this point in the history
  • Loading branch information
yjhmelody authored and Thomasdezeeuw committed Jan 20, 2020
1 parent c5f5289 commit 6cecb70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/interest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl ops::BitOr for Interest {

#[inline]
fn bitor(self, other: Self) -> Self {
Interest(unsafe { NonZeroU8::new_unchecked(self.0.get() | other.0.get()) })
self.add(other)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/io_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl SelectorId {
const UNASSOCIATED: usize = 0;

/// Create a new `SelectorId`.
fn new() -> SelectorId {
const fn new() -> SelectorId {
SelectorId {
id: AtomicUsize::new(Self::UNASSOCIATED),
}
Expand Down

0 comments on commit 6cecb70

Please sign in to comment.