Simplified bool to int conversion

This commit is contained in:
Nikolay Arhipov 2023-06-05 19:26:04 +03:00
parent 50117af409
commit ac48d49ff8

View File

@ -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)
}