We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c15adf6 commit 852c038Copy full SHA for 852c038
library/std/src/sys/windows/time.rs
@@ -1,7 +1,7 @@
1
use crate::cmp::Ordering;
2
use crate::fmt;
3
use crate::mem;
4
-use crate::ptr::{null, null_mut};
+use crate::ptr::null;
5
use crate::sys::c;
6
use crate::sys_common::IntoInner;
7
use crate::time::Duration;
@@ -240,7 +240,7 @@ impl WaitableTimer {
240
c::TIMER_ALL_ACCESS,
241
)
242
};
243
- if handle != null_mut() { Ok(Self { handle }) } else { Err(()) }
+ if !handle.is_null() { Ok(Self { handle }) } else { Err(()) }
244
}
245
pub fn set(&self, duration: Duration) -> Result<(), ()> {
246
// Convert the Duration to a format similar to FILETIME.
0 commit comments