Skip to content

Commit

Permalink
Simplified bool to int conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh committed Jun 5, 2023
1 parent 50117af commit ac48d49
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions library/std/src/sys/unix/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,7 @@ impl Socket {

#[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)
}

Expand Down

0 comments on commit ac48d49

Please sign in to comment.