Skip to content

Commit 7f49dca

Browse files
Merge pull request #1759 from rust-osdev/doc-improv
style: cargo doc fixes and improvements
2 parents b02a37d + 4ebedec commit 7f49dca

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

uefi/src/boot.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
@@ -746,12 +748,14 @@ pub unsafe fn install_protocol_interface(
746748
.to_result_with_val(|| unsafe { Handle::from_ptr(handle) }.unwrap())
747749
}
748750

749-
/// Reinstalls a protocol interface on a device handle. `old_interface` is replaced with `new_interface`.
750-
/// These interfaces may be the same, in which case the registered protocol notifications occur for the handle
751-
/// without replacing the interface.
751+
/// Reinstalls a protocol interface on a device handle. `old_interface` is
752+
/// replaced with `new_interface`.
753+
///
754+
/// These interfaces may be the same, in which case the registered protocol
755+
/// notifications occur for the handle without replacing the interface.
752756
///
753-
/// As with `install_protocol_interface`, any process that has registered to wait for the installation of
754-
/// the interface is notified.
757+
/// As with `install_protocol_interface`, any process that has registered to
758+
/// wait for the installation of the interface is notified.
755759
///
756760
/// # Safety
757761
///

uefi/src/data_types/strs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ impl UnalignedSlice<'_, u16> {
770770
}
771771

772772
/// The EqStrUntilNul trait helps to compare Rust strings against UEFI string types (UCS-2 strings).
773+
///
773774
/// The given generic implementation of this trait enables us that we only have to
774775
/// implement one direction (`left.eq_str_until_nul(&right)`) for each UEFI string type and we
775776
/// get the other direction (`right.eq_str_until_nul(&left)`) for free. Hence, the relation is

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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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,9 +908,10 @@ 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
910-
/// limited to a specific type of variable (as specified by the
911-
/// `attributes` argument to `query_variable_info`).
911+
/// [`query_variable_info`].
912+
///
913+
/// Note that the data here is limited to a specific type of variable (as
914+
/// specified by the `attributes` argument to `query_variable_info`).
912915
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
913916
pub struct VariableStorageInfo {
914917
/// Maximum size in bytes of the storage space available for

0 commit comments

Comments
 (0)