Fix kqueue network poller deprecation

parent dcc7798b
......@@ -11,7 +11,7 @@ use nix::sys::event::{
};
use nix::unistd::close;
use std::io;
use std::mem;
use std::mem::MaybeUninit;
use std::ops::Drop;
use std::os::unix::io::{AsRawFd, RawFd};
......@@ -114,7 +114,8 @@ impl NetworkPoller {
kevent!(fd, EVFILT_WRITE, flags | write_flag, id),
];
let mut changed: [KEvent; 2] = unsafe { mem::uninitialized() };
let mut changed: [KEvent; 2] =
unsafe { MaybeUninit::uninit().assume_init() };
map_error(kevent_ts(self.fd, &changes, &mut changed, None))?;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment