Skip to content

Commit

Permalink
Fix clippy warning in futures_unordered
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed Jul 24, 2018
1 parent 05f6cbe commit 2818692
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions futures-util/src/stream/futures_unordered/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,12 @@ impl<Fut> Node<Fut> {

/// Returns a local waker for this node without cloning the Arc.
pub(super) fn local_waker(self: &'a Arc<Node<Fut>>) -> LocalWakerRef<'a> {
// Safety: This is save because an `Arc` is a struct which contains
// Safety: This is safe because an `Arc` is a struct which contains
// a single field that is a pointer.
let ptr = unsafe {
*mem::transmute::<*const Arc<Node<Fut>>,
*const NonNull<ArcNodeUnowned<Fut>>>(self)
*(self as *const _ as *const NonNull<ArcNodeUnowned<Fut>>)
};


let ptr = ptr as NonNull<dyn UnsafeWake>;

// Hide lifetime of `self`
Expand Down

0 comments on commit 2818692

Please sign in to comment.