Merge pull request #1774 from rust-osdev/clippy-tightening-2

style: apply/fix more clippy lints (from cargo::nursery) (2/2)
This commit is contained in:
Nicholas Bishop
2025-10-21 16:21:44 +00:00
committed by GitHub
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -143,7 +143,7 @@ pub unsafe fn raise_tpl(tpl: Tpl) -> TplGuard {
///
/// * [`Status::OUT_OF_RESOURCES`]: allocation failed.
/// * [`Status::INVALID_PARAMETER`]: `mem_ty` is [`MemoryType::PERSISTENT_MEMORY`],
/// [`MemoryType::UNACCEPTED`], or in the range [`MemoryType::MAX`]`..=0x6fff_ffff`.
/// [`MemoryType::UNACCEPTED`], or in the range <code>[MemoryType::MAX]..=0x6fff_ffff</code>.
/// * [`Status::NOT_FOUND`]: the requested pages could not be found.
pub fn allocate_pages(
allocation_type: AllocateType,
@@ -229,7 +229,7 @@ pub unsafe fn free_pages(ptr: NonNull<u8>, count: usize) -> Result {
///
/// * [`Status::OUT_OF_RESOURCES`]: allocation failed.
/// * [`Status::INVALID_PARAMETER`]: `mem_ty` is [`MemoryType::PERSISTENT_MEMORY`],
/// [`MemoryType::UNACCEPTED`], or in the range [`MemoryType::MAX`]`..=0x6fff_ffff`.
/// [`MemoryType::UNACCEPTED`], or in the range <code>[MemoryType::MAX]..=0x6fff_ffff</code>.
pub fn allocate_pool(memory_type: MemoryType, size: usize) -> Result<NonNull<u8>> {
let bt = boot_services_raw_panicking();
let bt = unsafe { bt.as_ref() };
+1
View File
@@ -131,6 +131,7 @@ mod tests {
use super::PciIoAddress;
#[test]
#[allow(clippy::unusual_byte_groupings)]
fn test_pci_ioaddr_raw_conversion() {
assert_eq!(size_of::<u64>(), size_of::<PciIoAddress>());
let srcaddr = PciIoAddress {
+1 -1
View File
@@ -246,7 +246,7 @@ pub fn variable_keys() -> VariableKeys {
/// Iterator over all UEFI variables.
///
/// Each iteration yields a `Result<`[`VariableKey`]`>`. Error values:
/// Each iteration yields a <code>Result<`[`VariableKey`]`></code>. Error values:
///
/// * [`Status::DEVICE_ERROR`]: variable could not be read due to a hardware error.
/// * [`Status::UNSUPPORTED`]: this platform does not support variable storage