chore: use ptr::{null, null_mut} instead of 0 as *{const, mut} (#1333)

This commit is contained in:
Taiki Endo
2019-07-20 10:41:02 -07:00
committed by Carl Lerche
parent 7a52ddcd09
commit 1b2d997863
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ use tokio_executor;
use log::trace;
use std::cell::Cell;
use std::marker::PhantomData;
use std::ptr;
use std::rc::Rc;
use std::sync::atomic::Ordering::{AcqRel, Acquire};
use std::sync::Arc;
@@ -81,7 +82,7 @@ struct CurrentTask {
pub struct WorkerId(pub(crate) usize);
// Pointer to the current worker info
thread_local!(static CURRENT_WORKER: Cell<*const Worker> = Cell::new(0 as *const _));
thread_local!(static CURRENT_WORKER: Cell<*const Worker> = Cell::new(ptr::null()));
impl Worker {
pub(crate) fn new(