summaryrefslogtreecommitdiffstats
path: root/tokio-tls
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2019-07-21 02:41:02 +0900
committerCarl Lerche <me@carllerche.com>2019-07-20 10:41:02 -0700
commit1b2d997863709a3d5cb1e2dc78048d7e6566a17f (patch)
tree428a0752ccb33f479bd45d62bf693fcc3d22d319 /tokio-tls
parent7a52ddcd0962dcbd88e1dc401f0a84319397a6d9 (diff)
chore: use ptr::{null, null_mut} instead of 0 as *{const, mut} (#1333)
Diffstat (limited to 'tokio-tls')
-rw-r--r--tokio-tls/tests/smoke.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tokio-tls/tests/smoke.rs b/tokio-tls/tests/smoke.rs
index 18cf3976..024db496 100644
--- a/tokio-tls/tests/smoke.rs
+++ b/tokio-tls/tests/smoke.rs
@@ -10,6 +10,7 @@ use native_tls::{Identity, TlsAcceptor, TlsConnector};
use std::io::Write;
use std::marker::Unpin;
use std::process::Command;
+use std::ptr;
use tokio::io::{AsyncReadExt, AsyncWrite, AsyncWriteExt, Error, ErrorKind};
use tokio::net::{TcpListener, TcpStream};
use tokio_tls;
@@ -33,7 +34,7 @@ struct Keys {
#[allow(dead_code)]
fn openssl_keys() -> &'static Keys {
static INIT: Once = Once::new();
- static mut KEYS: *mut Keys = 0 as *mut _;
+ static mut KEYS: *mut Keys = ptr::null_mut();
INIT.call_once(|| {
let path = t!(env::current_exe());
@@ -160,7 +161,7 @@ cfg_if! {
// self-signed certificate, so we just fork out to the `openssl` binary.
fn keys() -> (&'static [u8], &'static [u8]) {
static INIT: Once = Once::new();
- static mut KEYS: *mut (Vec<u8>, Vec<u8>) = 0 as *mut _;
+ static mut KEYS: *mut (Vec<u8>, Vec<u8>) = ptr::null_mut();
INIT.call_once(|| {
let (key, cert) = openssl_keys();
@@ -266,7 +267,6 @@ cfg_if! {
use std::fs::File;
use std::io::Error;
use std::mem;
- use std::ptr;
use std::sync::Once;
use schannel::cert_context::CertContext;