std: Remove #[allow] directives in sys modules
These were suppressing lots of interesting warnings! Turns out there was also quite a bit of dead code.
This commit is contained in:
parent
206ee0e853
commit
c933d44f7b
35 changed files with 86 additions and 176 deletions
|
@ -26,7 +26,9 @@ use str;
|
|||
use sys::{self, retry, c, sock_t, last_error, last_net_error, last_gai_error, close_sock,
|
||||
wrlen, msglen_t, os, wouldblock, set_nonblocking, timer, ms_to_timeval,
|
||||
decode_error_detailed};
|
||||
use sync::{Arc, Mutex, MutexGuard};
|
||||
use sync::{Arc, Mutex};
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
use sync::MutexGuard;
|
||||
use sys_common::{self, keep_going, short_write, timeout};
|
||||
use cmp;
|
||||
use old_io;
|
||||
|
@ -620,11 +622,13 @@ impl Drop for Inner {
|
|||
fn drop(&mut self) { unsafe { close_sock(self.fd); } }
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
pub struct Guard<'a> {
|
||||
pub fd: sock_t,
|
||||
pub guard: MutexGuard<'a, ()>,
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
#[unsafe_destructor]
|
||||
impl<'a> Drop for Guard<'a> {
|
||||
fn drop(&mut self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue