Skip to content

Commit eaa349b

Browse files
committed
style: cargo doc fixes and improvements
1 parent b02a37d commit eaa349b

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

uefi/src/boot.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub unsafe fn raise_tpl(tpl: Tpl) -> TplGuard {
143143
///
144144
/// * [`Status::OUT_OF_RESOURCES`]: allocation failed.
145145
/// * [`Status::INVALID_PARAMETER`]: `mem_ty` is [`MemoryType::PERSISTENT_MEMORY`],
146-
/// [`MemoryType::UNACCEPTED`], or in the range [`MemoryType::MAX`]`..=0x6fff_ffff`.
146+
/// [`MemoryType::UNACCEPTED`], or in the range [`MemoryType::MAX`] `..=0x6fff_ffff`.
147147
/// * [`Status::NOT_FOUND`]: the requested pages could not be found.
148148
pub fn allocate_pages(
149149
allocation_type: AllocateType,
@@ -229,7 +229,7 @@ pub unsafe fn free_pages(ptr: NonNull<u8>, count: usize) -> Result {
229229
///
230230
/// * [`Status::OUT_OF_RESOURCES`]: allocation failed.
231231
/// * [`Status::INVALID_PARAMETER`]: `mem_ty` is [`MemoryType::PERSISTENT_MEMORY`],
232-
/// [`MemoryType::UNACCEPTED`], or in the range [`MemoryType::MAX`]`..=0x6fff_ffff`.
232+
/// [`MemoryType::UNACCEPTED`], or in the range [`MemoryType::MAX`] `..=0x6fff_ffff`.
233233
pub fn allocate_pool(memory_type: MemoryType, size: usize) -> Result<NonNull<u8>> {
234234
let bt = boot_services_raw_panicking();
235235
let bt = unsafe { bt.as_ref() };
@@ -531,7 +531,9 @@ pub fn check_event(event: Event) -> Result<bool> {
531531
}
532532
}
533533

534-
/// Places the supplied `event` in the signaled state. If `event` is already in
534+
/// Places the supplied `event` in the signaled state.
535+
///
536+
/// If `event` is already in
535537
/// the signaled state, the function returns successfully. If `event` is of type
536538
/// [`NOTIFY_SIGNAL`], the event's notification function is scheduled to be
537539
/// invoked at the event's notification task priority level.

uefi/src/mem/memory_map/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ impl Align for MemoryDescriptor {
6060
pub struct MemoryMapKey(pub(crate) usize);
6161

6262
/// A structure containing the meta attributes associated with a call to
63-
/// `GetMemoryMap` of UEFI. Note that all values refer to the time this was
63+
/// `GetMemoryMap` of UEFI.
64+
///
65+
/// Note that all values refer to the time this was
6466
/// called. All following invocations (hidden, subtle, and asynchronous ones)
6567
/// will likely invalidate this.
6668
#[derive(Copy, Clone, Debug)]

uefi/src/proto/media/file/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// SPDX-License-Identifier: MIT OR Apache-2.0
22

3-
//! This module provides the `FileHandle` structure as well as the more specific `RegularFile` and
4-
//! `Directory` structures. This module also provides the `File` trait for opening, querying,
3+
//! This module provides the [`FileHandle`] structure as well as the more
4+
//! specific [`RegularFile`] and [`Directory`] structures.
5+
//!
6+
//! This module also provides the [`File`] trait for opening, querying,
57
//! creating, reading, and writing files.
68
//!
79
//! Usually a file system implementation will return a "root" directory, representing

uefi/src/runtime.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ pub fn variable_keys() -> VariableKeys {
256256

257257
/// Iterator over all UEFI variables.
258258
///
259-
/// Each iteration yields a `Result<`[`VariableKey`]`>`. Error values:
259+
/// Each iteration yields a `Result<` [`VariableKey`] `>`. Error values:
260260
///
261261
/// * [`Status::DEVICE_ERROR`]: variable could not be read due to a hardware error.
262262
/// * [`Status::UNSUPPORTED`]: this platform does not support variable storage
@@ -514,7 +514,9 @@ pub fn reset(reset_type: ResetType, status: Status, data: Option<&[u8]>) -> ! {
514514
}
515515

516516
/// Changes the runtime addressing mode of EFI firmware from physical to
517-
/// virtual. It is up to the caller to translate the old system table address
517+
/// virtual.
518+
///
519+
/// It is up to the caller to translate the old system table address
518520
/// to a new virtual address and provide it for this function.
519521
///
520522
/// If successful, this function will call [`set_system_table`] with
@@ -906,7 +908,9 @@ impl Display for VariableKey {
906908
}
907909

908910
/// Information about UEFI variable storage space returned by
909-
/// [`query_variable_info`]. Note that the data here is
911+
/// [`query_variable_info`].
912+
///
913+
/// Note that the data here is
910914
/// limited to a specific type of variable (as specified by the
911915
/// `attributes` argument to `query_variable_info`).
912916
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]

0 commit comments

Comments
 (0)