Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ntex-rs/ntex
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Nov 30, 2020
2 parents 384ef68 + f09c9e4 commit cb59ddb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ntex/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ impl LocalWaker {
///
/// Returns `true` if waker was registered before.
pub fn register(&self, waker: &Waker) -> bool {
unsafe {
let w = self.waker.get();
let is_registered = (*w).is_some();
*w = Some(waker.clone());
is_registered
}
unsafe { self.waker.get().replace(Some(waker.clone())).is_some() }
}

#[inline]
Expand Down

0 comments on commit cb59ddb

Please sign in to comment.