From 951732a4c58fcf3eed08117e8936261d00098bb8 Mon Sep 17 00:00:00 2001 From: Markus Ebner Date: Sat, 5 Apr 2025 02:46:26 +0200 Subject: [PATCH] Fix lints with Rust 1.86 --- uefi/src/proto/driver/component_name.rs | 2 +- uefi/src/proto/media/block.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/uefi/src/proto/driver/component_name.rs b/uefi/src/proto/driver/component_name.rs index 1e948eeb0..07cc7f6c5 100644 --- a/uefi/src/proto/driver/component_name.rs +++ b/uefi/src/proto/driver/component_name.rs @@ -184,7 +184,7 @@ impl ComponentName { /// /// [ISO 639-2]: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes /// [RFC 4646]: https://www.rfc-editor.org/rfc/rfc4646 - pub fn supported_languages(&self) -> core::result::Result { + pub const fn supported_languages(&self) -> core::result::Result { match self { Self::V1(cn1) => cn1.supported_languages(), Self::V2(cn2) => cn2.supported_languages(), diff --git a/uefi/src/proto/media/block.rs b/uefi/src/proto/media/block.rs index 70be5472e..670cac433 100644 --- a/uefi/src/proto/media/block.rs +++ b/uefi/src/proto/media/block.rs @@ -24,7 +24,7 @@ impl BlockIO { /// /// # Arguments /// * `extended_verification` Indicates that the driver may perform a more exhaustive verification operation of - /// the device during reset. + /// the device during reset. /// /// # Errors /// * `uefi::Status::DEVICE_ERROR` The block device is not functioning correctly and could not be reset. @@ -41,13 +41,13 @@ impl BlockIO { /// /// # Errors /// * `uefi::Status::DEVICE_ERROR` The device reported an error while attempting to perform the read - /// operation. + /// operation. /// * `uefi::Status::NO_MEDIA` There is no media in the device. /// * `uefi::Status::MEDIA_CHANGED` The `media_id` is not for the current media. /// * `uefi::Status::BAD_BUFFER_SIZE` The buffer size parameter is not a multiple of the intrinsic block size of - /// the device. + /// the device. /// * `uefi::Status::INVALID_PARAMETER` The read request contains LBAs that are not valid, or the buffer is not on - /// proper alignment. + /// proper alignment. pub fn read_blocks(&self, media_id: u32, lba: Lba, buffer: &mut [u8]) -> Result { let buffer_size = buffer.len(); unsafe { @@ -74,11 +74,11 @@ impl BlockIO { /// * `uefi::Status::NO_MEDIA` There is no media in the device. /// * `uefi::Status::MEDIA_CHANGED` The `media_id` is not for the current media. /// * `uefi::Status::DEVICE_ERROR` The device reported an error while attempting to perform the write - /// operation. + /// operation. /// * `uefi::Status::BAD_BUFFER_SIZE` The buffer size parameter is not a multiple of the intrinsic block size - /// of the device. + /// of the device. /// * `uefi::Status::INVALID_PARAMETER` The write request contains LBAs that are not valid, or the buffer is not - /// on proper alignment. + /// on proper alignment. pub fn write_blocks(&mut self, media_id: u32, lba: Lba, buffer: &[u8]) -> Result { let buffer_size = buffer.len(); unsafe {