Simplified bool to int conversion
This commit is contained in:
parent
50117af409
commit
ac48d49ff8
@ -462,10 +462,7 @@ pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
|
||||
|
||||
#[cfg(target_os = "vita")]
|
||||
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
|
||||
let option = match nonblocking {
|
||||
true => 1,
|
||||
false => 0,
|
||||
};
|
||||
let option = nonblocking as libc::c_int;
|
||||
setsockopt(self, libc::SOL_SOCKET, libc::SO_NONBLOCK, option)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user