Fix new clippy lints

This commit is contained in:
Nicholas Bishop
2026-03-08 14:20:46 -04:00
parent d318a25e59
commit 1b06a3b613
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -111,6 +111,7 @@ use crate::proto::{ProtocolPointer, unsafe_protocol};
use core::ffi::c_void;
use core::fmt::{self, Debug, Display, Formatter};
use core::ops::Deref;
use core::ptr;
use ptr_meta::Pointee;
use uefi_raw::protocol::device_path::DevicePathProtocol;
#[cfg(feature = "alloc")]
@@ -551,8 +552,7 @@ impl DevicePath {
/// Cast to a [`FfiDevicePath`] pointer.
#[must_use]
pub const fn as_ffi_ptr(&self) -> *const FfiDevicePath {
let p = self as *const Self;
p.cast()
ptr::from_ref(self).cast()
}
/// Get an iterator over the [`DevicePathInstance`]s in this path.
+1 -1
View File
@@ -52,7 +52,7 @@ impl Rng {
let algo = match algorithm.as_ref() {
None => ptr::null(),
Some(algo) => algo as *const RngAlgorithmType,
Some(algo) => ptr::from_ref(algo),
};
unsafe {