From 06fb196256bbab1e7aa4f43daf45321efaa6e0eb Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 3 Sep 2015 09:49:50 +0300 Subject: Use `null()`/`null_mut()` instead of `0 as *const T`/`0 as *mut T` --- src/libstd/io/lazy.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstd/io') diff --git a/src/libstd/io/lazy.rs b/src/libstd/io/lazy.rs index c3e309d182b..ad17a650336 100644 --- a/src/libstd/io/lazy.rs +++ b/src/libstd/io/lazy.rs @@ -11,6 +11,7 @@ use prelude::v1::*; use cell::Cell; +use ptr; use rt; use sync::{StaticMutex, Arc}; @@ -26,7 +27,7 @@ impl Lazy { pub const fn new(init: fn() -> Arc) -> Lazy { Lazy { lock: StaticMutex::new(), - ptr: Cell::new(0 as *mut _), + ptr: Cell::new(ptr::null_mut()), init: init } } -- cgit 1.4.1-3-g733a5