Use drop instead of the toilet closure |_| ()
This commit is contained in:
parent
5095101528
commit
dd8f072233
25 changed files with 35 additions and 35 deletions
|
@ -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>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue