mirror of
https://github.com/edera-dev/sprout.git
synced 2026-02-04 07:10:18 +00:00
chore(docs): fix all rustdoc warnings (#54)
This commit is contained in:
@@ -48,7 +48,7 @@ version = "1.3.0"
|
||||
default-features = false
|
||||
|
||||
[workspace.dependencies.toml]
|
||||
version = "0.9.10+spec-1.1.0"
|
||||
version = "0.9.10"
|
||||
default-features = false
|
||||
features = ["serde", "parse"]
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ const INITRAMFS_PREFIXES: &[&str] = &["initramfs", "initrd", "initrd.img"];
|
||||
/// and then uses that code improperly by asserting that the pointer is non-null.
|
||||
/// To give a good user experience, we place a placeholder value here to ensure it's non-empty.
|
||||
/// For stubble, this code ensures the command line pointer becomes null:
|
||||
/// https://github.com/ubuntu/stubble/blob/e56643979addfb98982266018e08921c07424a0c/stub.c#L61-L64
|
||||
/// <https://github.com/ubuntu/stubble/blob/e56643979addfb98982266018e08921c07424a0c/stub.c#L61-L64>
|
||||
/// Then this code asserts on it, stopping the boot process:
|
||||
/// https://github.com/ubuntu/stubble/blob/e56643979addfb98982266018e08921c07424a0c/stub.c#L27
|
||||
/// <https://github.com/ubuntu/stubble/blob/e56643979addfb98982266018e08921c07424a0c/stub.c#L27>
|
||||
const DEFAULT_LINUX_OPTIONS: &str = "placeholder";
|
||||
|
||||
/// Pair of kernel and initramfs.
|
||||
|
||||
@@ -26,7 +26,7 @@ fn quirk_initrd_remove_tuned(input: String) -> String {
|
||||
}
|
||||
|
||||
/// Sorts two entries according to the BLS sort system.
|
||||
/// Reference: https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting
|
||||
/// Reference: <https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting>
|
||||
fn sort_entries(a: &(BlsEntry, BootableEntry), b: &(BlsEntry, BootableEntry)) -> Ordering {
|
||||
// Grab the components of both entries.
|
||||
let (a_bls, a_boot) = a;
|
||||
|
||||
@@ -6,7 +6,7 @@ use anyhow::{Context, Result};
|
||||
use edera_sprout_config::phases::PhaseConfiguration;
|
||||
|
||||
/// Executes the specified [phase] of the boot process.
|
||||
/// The value [phase] should be a reference of a specific phase in the [PhasesConfiguration].
|
||||
/// The value [phase] should be a reference of a specific phase in the `PhasesConfiguration`.
|
||||
/// Any error from the actions is propagated into the [Result] and will interrupt further
|
||||
/// execution of phase actions.
|
||||
pub fn phase(context: Rc<SproutContext>, phase: &[PhaseConfiguration]) -> Result<()> {
|
||||
|
||||
@@ -33,7 +33,7 @@ pub fn compare_versions_optional(a: Option<&str>, b: Option<&str>) -> Ordering {
|
||||
}
|
||||
|
||||
/// Compares two strings using the BLS version comparison specification.
|
||||
/// See: https://uapi-group.org/specifications/specs/version_format_specification/
|
||||
/// See: <https://uapi-group.org/specifications/specs/version_format_specification/>
|
||||
pub fn compare_versions(a: &str, b: &str) -> Ordering {
|
||||
// Acquire a peekable iterator for each string.
|
||||
let mut a_chars = a.chars().peekable();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/// Define the SBAT attestation by including the sbat.csv file.
|
||||
/// See this document for more details: https://github.com/rhboot/shim/blob/main/SBAT.md
|
||||
/// See this document for more details: <https://github.com/rhboot/shim/blob/main/SBAT.md>
|
||||
/// NOTE: This data must be aligned by 512 bytes.
|
||||
#[used]
|
||||
#[unsafe(link_section = ".sbat")]
|
||||
|
||||
@@ -13,7 +13,7 @@ pub struct ChainloadConfiguration {
|
||||
#[serde(default)]
|
||||
pub options: Vec<String>,
|
||||
/// An optional path to a Linux initrd.
|
||||
/// This uses the [LINUX_EFI_INITRD_MEDIA_GUID] mechanism to load the initrd into the EFI stack.
|
||||
/// This uses the `LINUX_EFI_INITRD_MEDIA_GUID` mechanism to load the initrd into the EFI stack.
|
||||
/// For Linux, you can also use initrd=\path\to\initrd as an option, but this option is
|
||||
/// generally better and safer as it can support additional load options in the future.
|
||||
#[serde(default, rename = "linux-initrd")]
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
//! Sprout EFI Core.
|
||||
//! This crate provides tools for working with the EFI environment.
|
||||
//! Sprout EFI core.
|
||||
//! This crate provides core EFI functionality for Sprout.
|
||||
|
||||
// For some reason this triggers, and I can't figure out why.
|
||||
#![allow(rustdoc::bare_urls)]
|
||||
#![no_std]
|
||||
extern crate alloc;
|
||||
|
||||
|
||||
@@ -34,8 +34,7 @@ struct MediaLoaderProtocol {
|
||||
}
|
||||
|
||||
/// Represents a media loader which has been registered in the UEFI stack.
|
||||
/// You MUST call [MediaLoaderHandle::unregister] when ready to unregister.
|
||||
/// [Drop] is not implemented for this type.
|
||||
/// Calling `drop` on this handle will unregister the media loader.
|
||||
pub struct MediaLoaderHandle {
|
||||
/// The handle of the media loader in the UEFI stack.
|
||||
handle: Handle,
|
||||
|
||||
Reference in New Issue
Block a user