Skip to content

Commit

Permalink
fix clippy warning under 1.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Giersch committed Nov 27, 2022
1 parent 6f29249 commit f75a52e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
- uses: dtolnay/rust-toolchain@miri
- run: cargo miri test
env:
MIRIFLAGS: -Zmiri-strict-provenance
# MIRIFLAGS: -Zmiri-permissive-provenance
#MIRIFLAGS: -Zmiri-strict-provenance
MIRIFLAGS: -Zmiri-permissive-provenance
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@

#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
#![deny(missing_docs)]
#![deny(clippy::missing_safety_doc)]

#[cfg(test)]
#[macro_use]
Expand Down
15 changes: 7 additions & 8 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,20 @@ impl AtomicOnceState {
#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
pub struct BlockedState(usize);

impl BlockedState {
// TODO: return *const StackWaiter directly?
#[cfg(feature = "std")]
pub(crate) fn as_ptr(self) -> *const () {
self.0 as *const _
}
}

impl From<BlockedState> for usize {
#[inline]
fn from(state: BlockedState) -> Self {
state.0
}
}

#[cfg(feature = "std")]
impl BlockedState {
pub(crate) fn as_ptr(self) -> *const StackWaiter {
self.0 as *const _
}
}

#[cfg(feature = "std")]
impl From<*const StackWaiter> for BlockedState {
#[inline]
Expand Down

0 comments on commit f75a52e

Please sign in to comment.