mirror of
https://github.com/rust-osdev/uefi-rs
synced 2026-06-08 17:17:36 +00:00
Fix new clippy lints
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user