Skip to content

Commit

Permalink
Use imported last_os_error
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Jun 21, 2024
1 parent 53110ab commit db54f2c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/linux_android_with_fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ fn futex_wait() {
debug_assert!({
match ret {
0 => true,
-1 => {
let err = crate::util_libc::last_os_error();
err.raw_os_error() == Some(libc::EAGAIN)
}
-1 => last_os_error().raw_os_error() == Some(libc::EAGAIN),
_ => false,
}
});
Expand Down Expand Up @@ -158,7 +155,7 @@ fn wait_until_rng_ready() -> Result<(), Error> {
debug_assert_eq!(res, 1);
break Ok(());
}
let err = crate::util_libc::last_os_error();
let err = last_os_error();
match err.raw_os_error() {
Some(libc::EINTR) | Some(libc::EAGAIN) => continue,
_ => break Err(err),
Expand Down

0 comments on commit db54f2c

Please sign in to comment.