From d3f9e876fbb0bc225732e717339fabc41148f101 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Fri, 24 Oct 2025 15:54:58 -0700 Subject: [PATCH] fix(docs): cleanup rustdoc warnings --- src/drivers.rs | 2 +- src/utils.rs | 14 +++++++------- src/utils/media_loader.rs | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/drivers.rs b/src/drivers.rs index 25004d6..f2e0daa 100644 --- a/src/drivers.rs +++ b/src/drivers.rs @@ -19,7 +19,7 @@ pub struct DriverDeclaration { pub path: String, } -/// Loads the driver specified by the [driver] declaration. +/// Loads the driver specified by the `driver` declaration. fn load_driver(context: Rc, driver: &DriverDeclaration) -> Result<()> { // Acquire the handle and device path of the loaded image. let sprout_image = uefi::boot::image_handle(); diff --git a/src/utils.rs b/src/utils.rs index d6ebf86..24edafd 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -12,7 +12,7 @@ pub mod framebuffer; /// Support code for the media loader protocol. pub mod media_loader; -/// Parses the input [path] as a [DevicePath]. +/// Parses the input `path` as a [DevicePath]. /// Uses the [DevicePathFromText] protocol exclusively, and will fail if it cannot acquire the protocol. pub fn text_to_device_path(path: &str) -> Result { let path = CString16::try_from(path).context("unable to convert path to CString16")?; @@ -27,7 +27,7 @@ pub fn text_to_device_path(path: &str) -> Result { .context("unable to convert text to device path") } -/// Grabs the root part of the [path]. +/// Grabs the root part of the `path`. /// For example, given "PciRoot(0x0)/Pci(0x4,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(1,MBR,0xBE1AFDFA,0x3F,0xFBFC1)/\EFI\BOOT\BOOTX64.efi" /// it will give "PciRoot(0x0)/Pci(0x4,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(1,MBR,0xBE1AFDFA,0x3F,0xFBFC1)" pub fn device_path_root(path: &DevicePath) -> Result { @@ -52,7 +52,7 @@ pub fn device_path_root(path: &DevicePath) -> Result { Ok(path) } -/// Grabs the part of the [path] after the root. +/// Grabs the part of the `path` after the root. /// For example, given "PciRoot(0x0)/Pci(0x4,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(1,MBR,0xBE1AFDFA,0x3F,0xFBFC1)/\EFI\BOOT\BOOTX64.efi" /// it will give "\EFI\BOOT\BOOTX64.efi" pub fn device_path_subpath(path: &DevicePath) -> Result { @@ -92,8 +92,8 @@ pub struct ResolvedPath { pub filesystem_handle: Handle, } -/// Resolve a path specified by [input] to its various components. -/// Uses [default_root_path] as the base root if one is not specified in the path. +/// Resolve a path specified by `input` to its various components. +/// Uses `default_root_path` as the base root if one is not specified in the path. /// Returns [ResolvedPath] which contains the resolved components. pub fn resolve_path(default_root_path: &DevicePath, input: &str) -> Result { let mut path = text_to_device_path(input).context("unable to convert text to path")?; @@ -137,9 +137,9 @@ pub fn resolve_path(default_root_path: &DevicePath, input: &str) -> Result) -> Result {