mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
chore: remove unnecessary conversion (#1332)
This commit is contained in:
@@ -34,7 +34,7 @@ impl AtomicStack {
|
||||
/// on the stack, `Err` if the timer is shutdown.
|
||||
pub fn push(&self, entry: &Arc<Entry>) -> Result<bool, Error> {
|
||||
// First, set the queued bit on the entry
|
||||
let queued = entry.queued.fetch_or(true, SeqCst).into();
|
||||
let queued = entry.queued.fetch_or(true, SeqCst);
|
||||
|
||||
if queued {
|
||||
// Already queued, nothing more to do
|
||||
|
||||
@@ -302,7 +302,7 @@ impl Entry {
|
||||
|
||||
self.waker.register_by_ref(cx.waker());
|
||||
|
||||
curr = self.state.load(SeqCst).into();
|
||||
curr = self.state.load(SeqCst);
|
||||
|
||||
if is_elapsed(curr) {
|
||||
return Poll::Ready(if curr == ERROR {
|
||||
|
||||
Reference in New Issue
Block a user