Skip to content

Commit 39d6150

Browse files
[docs+fmt] fix-up doc warnings (from CI) and set rustfmt edition (#749)
* [docs+fmt] fix-up doc warnings (from CI) and set rustfmt edition The rustfmt.toml update is in line w/ omicron and other oxide libraries/repositories and helpful for editors doing auto cargo formatting (`cargo fmt`).
1 parent 64350cd commit 39d6150

File tree

8 files changed

+16
-15
lines changed

8 files changed

+16
-15
lines changed

crates/rgb-frame/src/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl Frame {
6161
/// contents initalized via the `populate` function.
6262
///
6363
/// The responsibility is left to the caller to properly initalize the
64-
/// entire [MaybeUninit<u8>] slice provided to the `populate` argument. The
64+
/// entire [`MaybeUninit<u8>`] slice provided to the `populate` argument. The
6565
/// stride length of that buffer is provided as the second argument.
6666
pub fn new_uninit<F>(spec: Spec, populate: F) -> Self
6767
where
@@ -154,22 +154,22 @@ impl Frame {
154154
#[repr(u32)]
155155
#[strum(serialize_all = "UPPERCASE")]
156156
pub enum FourCC {
157-
/// x:R:G:B [31:0] little endian
157+
/// x:R:G:B `\[` 31:0 `\]` little endian
158158
XR24 = 0x34325258,
159-
/// R:G:B:x [31:0] little endian
159+
/// R:G:B:x `\[` 31:0 `\]` little endian
160160
RX24 = 0x34325852,
161-
/// x:B:G:R [31:0] little endian
161+
/// x:B:G:R `\[` 31:0 `\]` little endian
162162
XB24 = 0x34325842,
163-
/// B:G:R:x [31:0] little endian
163+
/// B:G:R:x `\[` 31:0 `\]` little endian
164164
BX24 = 0x34324258,
165165

166-
/// A:R:G:B [31:0] little endian
166+
/// A:R:G:B `\[` 31:0 `\]` little endian
167167
AR24 = 0x34325241,
168-
/// R:G:B:A [31:0] little endian
168+
/// R:G:B:A `\[` 31:0 `\]` little endian
169169
RA24 = 0x34324152,
170-
/// A:B:G:R [31:0] little endian
170+
/// A:B:G:R `\[` 31:0 `\]` little endian
171171
AB24 = 0x34324142,
172-
/// B:G:R:A [31:0] little endian
172+
/// B:G:R:A `\[` 31:0 `\]` little endian
173173
BA24 = 0x34324241,
174174
}
175175
impl FourCC {

lib/propolis-client/src/support.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ pub enum WSClientOffset {
190190
}
191191

192192
/// This is a trivial abstraction wrapping the websocket connection returned
193-
/// by [crate::generated::Client::instance_serial], providing the additional
193+
/// by [crate::Client::instance_serial], providing the additional
194194
/// functionality of connecting to the new propolis-server when an instance
195195
/// is migrated (thus providing the illusion of the connection being
196196
/// seamlessly maintained through migration)

lib/propolis/src/cpuid.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl From<Set> for Vec<bhyve_api::vcpu_cpuid_entry> {
116116
}
117117
}
118118

119-
/// Convert a [vcpu_cpuid_entry](bhyve_api::vcpu_cpuid_entry) into an ([Ident],
119+
/// Convert a [vcpu_cpuid_entry] into an ([Ident],
120120
/// [Entry]) tuple, suitable for insertion into a [Set].
121121
///
122122
/// This would be implemented as a [From] trait if rust let us.

lib/propolis/src/firmware/smbios/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use table::{Table, Type127};
1010
mod bits;
1111
pub mod table;
1212

13-
/// Collection of SMBIOS [table](table) instances, which will be rendered out
13+
/// Collection of SMBIOS [table] instances, which will be rendered out
1414
/// into two blocks of raw bytes representing the SMBIOS Entry Point and
1515
/// SMBIOS Structure Table.
1616
pub struct Tables {

lib/propolis/src/vmm/machine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Machine {
6060
}
6161

6262
/// Destroy the `Machine` and its associated resources. Returns the
63-
/// underlying [VmmHdl](crate::vmm::VmmHdl) for the caller to do further
63+
/// underlying [VmmHdl] for the caller to do further
6464
/// cleanup, such as destroy the kernel VMM instance.
6565
pub fn destroy(mut self) -> Arc<VmmHdl> {
6666
self.do_destroy().expect("machine not already destroyed")

phd-tests/framework/src/disk/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
//! Routines for creating and managing guest disks.
66
//!
7-
//! Test cases create disks using the [`DiskFactory`] in their test contexts.
7+
//! Test cases create disks using the `DiskFactory` in their test contexts.
88
//! They can then pass these disks to the VM factory to connect them to a
99
//! specific guest VM.
1010

phd-tests/framework/src/test_vm/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ enum VmState {
132132
}
133133

134134
/// A virtual machine running in a Propolis server. Test cases create these VMs
135-
/// using the [`factory::VmFactory`] embedded in their test contexts.
135+
/// using the `factory::VmFactory` embedded in their test contexts.
136136
///
137137
/// Once a VM has been created, tests will usually want to issue [`TestVm::run`]
138138
/// and [`TestVm::wait_to_boot`] calls so they can begin interacting with the

rustfmt.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# ---------------------------------------------------------------------------
44
max_width = 80
55
use_small_heuristics = "max"
6+
edition = "2021"

0 commit comments

Comments
 (0)