1
Fork 0

Use drop instead of the toilet closure |_| ()

This commit is contained in:
Lzu Tao 2020-01-02 08:56:12 +00:00
parent 5095101528
commit dd8f072233
25 changed files with 35 additions and 35 deletions

View file

@ -324,7 +324,7 @@ impl Socket {
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
let mut nonblocking = nonblocking as libc::c_int;
cvt(unsafe { libc::ioctl(*self.as_inner(), libc::FIONBIO, &mut nonblocking) }).map(|_| ())
cvt(unsafe { libc::ioctl(*self.as_inner(), libc::FIONBIO, &mut nonblocking) }).map(drop)
}
pub fn take_error(&self) -> io::Result<Option<io::Error>> {