From 003081aa32ce07f3e412efdc63428e06dea3b78e Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Fri, 13 May 2022 18:25:43 -0600 Subject: [PATCH] Clippy cleanup --- src/sys/aio.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sys/aio.rs b/src/sys/aio.rs index 5a4705c73f..6ff88469b9 100644 --- a/src/sys/aio.rs +++ b/src/sys/aio.rs @@ -159,7 +159,7 @@ impl AioCb { } fn error(self: Pin<&mut Self>) -> Result<()> { - let r = unsafe { libc::aio_error(&mut self.aiocb().0) }; + let r = unsafe { libc::aio_error(&self.aiocb().0) }; match r { 0 => Ok(()), num if num > 0 => Err(Errno::from_i32(num)), @@ -1052,9 +1052,9 @@ pub fn aio_suspend( list: &[&dyn AsRef], timeout: Option, ) -> Result<()> { - let plist = list as *const [&dyn AsRef] - as *const [*const libc::aiocb]; - let p = plist as *const *const libc::aiocb; + let p = list as *const [&dyn AsRef] + as *const [*const libc::aiocb] + as *const *const libc::aiocb; let timep = match timeout { None => ptr::null::(), Some(x) => x.as_ref() as *const libc::timespec, @@ -1179,9 +1179,9 @@ pub fn lio_listio( list: &mut [Pin<&mut dyn AsMut>], sigev_notify: SigevNotify, ) -> Result<()> { - let plist = list as *mut [Pin<&mut dyn AsMut>] - as *mut [*mut libc::aiocb]; - let p = plist as *mut *mut libc::aiocb; + let p = list as *mut [Pin<&mut dyn AsMut>] + as *mut [*mut libc::aiocb] + as *mut *mut libc::aiocb; let sigev = SigEvent::new(sigev_notify); let sigevp = &mut sigev.sigevent() as *mut libc::sigevent; Errno::result(unsafe {