From db54f2c607fe32a6be72c24f35dc98b46edd2986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Fri, 21 Jun 2024 09:44:43 +0300 Subject: [PATCH] Use imported last_os_error --- src/linux_android_with_fallback.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/linux_android_with_fallback.rs b/src/linux_android_with_fallback.rs index a56051ce..551010e2 100644 --- a/src/linux_android_with_fallback.rs +++ b/src/linux_android_with_fallback.rs @@ -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, } }); @@ -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),