diff --git a/teletypewriter/src/windows/child.rs b/teletypewriter/src/windows/child.rs index cd214e56fb..108dcb2012 100644 --- a/teletypewriter/src/windows/child.rs +++ b/teletypewriter/src/windows/child.rs @@ -33,7 +33,7 @@ impl ChildExitWatcher { pub fn new(child_handle: HANDLE) -> Result { let (event_tx, event_rx) = channel::(); - let mut wait_handle: HANDLE = 0; + let mut wait_handle: HANDLE = std::ptr::null_mut(); let sender_ref = Box::new(event_tx); let success = unsafe { diff --git a/teletypewriter/src/windows/conpty.rs b/teletypewriter/src/windows/conpty.rs index 004071ab9a..6912f29d6f 100644 --- a/teletypewriter/src/windows/conpty.rs +++ b/teletypewriter/src/windows/conpty.rs @@ -68,7 +68,7 @@ impl ConptyApi { type LoadedFn = unsafe extern "system" fn() -> isize; unsafe { let hmodule = LoadLibraryW(w!("conpty.dll")); - if hmodule == 0 { + if hmodule == std::ptr::null_mut() { return None; } let create_fn = GetProcAddress(hmodule, s!("CreatePseudoConsole"))?; diff --git a/teletypewriter/src/windows/pipes.rs b/teletypewriter/src/windows/pipes.rs index f877a6e811..8253b6d6b2 100644 --- a/teletypewriter/src/windows/pipes.rs +++ b/teletypewriter/src/windows/pipes.rs @@ -201,7 +201,7 @@ impl Drop for EventedAnonRead { // Stop reader thread waiting for pipe contents unsafe { - CancelSynchronousIo(thread.as_raw_handle() as isize); + CancelSynchronousIo(thread.as_raw_handle()); } thread