mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1709505 - Fix -D dead-code bustage in third_party/rust/mio. r=emilio
After bug 1708379, the build fails with --enable-warnings-as-errors with rustc 1.52. ``` error: field is never read: `hdr` --> third_party/rust/mio/src/sys/unix/uds.rs:190:17 | 190 | hdr: libc::cmsghdr, | ^^^^^^^^^^^^^^^^^^ | = note: `-D dead-code` implied by `-D warnings` ``` ``` error: field is never read: `instant_notify` --> third_party/rust/mio/src/sys/windows/tcp.rs:85:5 | 85 | instant_notify: bool, | ^^^^^^^^^^^^^^^^^^^^ | = note: `-D dead-code` implied by `-D warnings` ``` Differential Revision: https://phabricator.services.mozilla.com/D114311
This commit is contained in:
parent
4178828587
commit
f1cf961151
1
third_party/rust/mio/src/sys/unix/uds.rs
vendored
1
third_party/rust/mio/src/sys/unix/uds.rs
vendored
@ -187,6 +187,7 @@ impl UnixSocket {
|
||||
iov_len: buf.len(),
|
||||
};
|
||||
struct Cmsg {
|
||||
#[allow(dead_code)]
|
||||
hdr: libc::cmsghdr,
|
||||
data: [libc::c_int; 1],
|
||||
}
|
||||
|
3
third_party/rust/mio/src/sys/windows/tcp.rs
vendored
3
third_party/rust/mio/src/sys/windows/tcp.rs
vendored
@ -82,7 +82,6 @@ struct ListenerInner {
|
||||
iocp: ReadyBinding,
|
||||
accept: State<net::TcpStream, (net::TcpStream, SocketAddr)>,
|
||||
accept_buf: AcceptAddrsBuf,
|
||||
instant_notify: bool,
|
||||
}
|
||||
|
||||
enum State<T, U> {
|
||||
@ -667,7 +666,6 @@ impl TcpListener {
|
||||
iocp: ReadyBinding::new(),
|
||||
accept: State::Empty,
|
||||
accept_buf: AcceptAddrsBuf::new(),
|
||||
instant_notify: false,
|
||||
}),
|
||||
}),
|
||||
},
|
||||
@ -808,7 +806,6 @@ impl Evented for TcpListener {
|
||||
|
||||
unsafe {
|
||||
super::no_notify_on_instant_completion(self.imp.inner.socket.as_raw_socket() as HANDLE)?;
|
||||
me.instant_notify = true;
|
||||
}
|
||||
|
||||
self.imp.schedule_accept(&mut me);
|
||||
|
Loading…
Reference in New Issue
Block a user