Swap out deprecated mem::uninitialized()
@@ -334,18 +334,17 @@ mod imp {
}
pub fn wait(&self) {
- unsafe {
loop {
let mut code: DWORD = 0;
let mut key: ULONG_PTR = 0;
- let mut overlapped: LPOVERLAPPED = mem::uninitialized();
- GetQueuedCompletionStatus(
+ let mut overlapped = mem::MaybeUninit::<LPOVERLAPPED>::uninit();
+ unsafe { GetQueuedCompletionStatus(
self.completion_port,
&mut code,
&mut key,
- &mut overlapped,
+ overlapped.as_mut_ptr(),
INFINITE,
- );
+ ); }
if code == JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO && (key as HANDLE) == self.job {
break;
@@ -353,7 +352,6 @@ mod imp {
}
}
}
- }
impl Drop for Process {
fn drop(&mut self) {
