From c5ce9db6910fa36e1e7e16ea26bfa1c09aa1aed3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 16 Sep 2025 19:39:11 +0200 Subject: [PATCH] Fix cargo doc Signed-off-by: Alyssa Ross --- vhost-device-gpio/src/backend.rs | 2 +- vhost-device-i2c/src/i2c.rs | 2 +- vhost-device-i2c/src/main.rs | 3 +-- vhost-device-scmi/src/devices/iio.rs | 16 ++++++++-------- vhost-device-sound/src/lib.rs | 4 ++-- vhost-device-sound/src/stream.rs | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/vhost-device-gpio/src/backend.rs b/vhost-device-gpio/src/backend.rs index 4a601bf..1a4e797 100644 --- a/vhost-device-gpio/src/backend.rs +++ b/vhost-device-gpio/src/backend.rs @@ -69,7 +69,7 @@ struct GpioArgs { socket_count: usize, /// List of GPIO devices, one for each guest, in the format - /// [s][:[s]]. + /// `[s][:[s]]`. #[clap(short = 'l', long)] device_list: String, } diff --git a/vhost-device-i2c/src/i2c.rs b/vhost-device-i2c/src/i2c.rs index 4fd281c..c0a0fad 100644 --- a/vhost-device-i2c/src/i2c.rs +++ b/vhost-device-i2c/src/i2c.rs @@ -152,7 +152,7 @@ union I2cSmbusData { byte: u8, word: u16, - /// block[0] is used for length, and one more for user-space compatibility + /// `block[0]` is used for length, and one more for user-space compatibility block: [u8; I2C_SMBUS_BLOCK_MAX + 2], } diff --git a/vhost-device-i2c/src/main.rs b/vhost-device-i2c/src/main.rs index 6a741f8..c122dfc 100644 --- a/vhost-device-i2c/src/main.rs +++ b/vhost-device-i2c/src/main.rs @@ -67,8 +67,7 @@ struct I2cArgs { socket_count: usize, /// List of I2C bus and clients in format - /// :[:][,:[: - /// ]]. + /// `:[:][,:[:]]`. #[clap(short = 'l', long)] device_list: String, } diff --git a/vhost-device-scmi/src/devices/iio.rs b/vhost-device-scmi/src/devices/iio.rs index 0c997fa..1b14059 100644 --- a/vhost-device-scmi/src/devices/iio.rs +++ b/vhost-device-scmi/src/devices/iio.rs @@ -171,7 +171,7 @@ enum IioEndian { } /// Representation of an IIO channel axis's scan type. -/// It is read from sysfs "scan_element/_type" +/// It is read from sysfs "scan_element/\_type" /// /// Used also for scalar values. #[derive(PartialEq, Debug, Clone, Copy)] @@ -250,18 +250,18 @@ struct Axis { /// Axis unit exponent, see [UnitMapping::unit_exponent] and [UNIT_MAPPING]. unit_exponent: i8, /// Additional exponent to apply to the axis values. It is computed from - /// the axis value scaling (see [IIOSensor::custom_exponent] to provide a - /// sufficiently accurate SCMI value that is represented by an integer (not - /// a float) + decadic exponent. + /// the axis value scaling (see [IIOSensor::custom_exponent_and_resolution] + /// to provide a sufficiently accurate SCMI value that is represented by an + /// integer (not a float) + decadic exponent. custom_exponent: i8, /// This is an extended attribute field. It reports the resolution of the - /// sensor axis. The representation is in [custom_resolution] x - /// 10^[custom_exponent] format. This field is present only if Bit[8] of - /// axis_attributes_low is set to 1. + /// sensor axis. The representation is in [Self::custom_resolution] x + /// 10^[Self::custom_exponent] format. This field is present only if + /// `Bit[8]` of axis_attributes_low is set to 1. custom_resolution: u64, /// Channel scan type, necessary if the sensor supports notifications. /// The data from /dev/iio:deviceX will be formatted according to this. - /// The ChanScanType is parsed from "scan_elements/_type" + /// The ChanScanType is parsed from "scan_elements/\_type" scan_type: Option, } diff --git a/vhost-device-sound/src/lib.rs b/vhost-device-sound/src/lib.rs index 4ee4667..8d21570 100644 --- a/vhost-device-sound/src/lib.rs +++ b/vhost-device-sound/src/lib.rs @@ -77,9 +77,9 @@ pub type Result = std::result::Result; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[repr(u8)] pub enum Direction { - /// [`VIRTIO_SND_D_OUTPUT`](crate::virtio_sound::VIRTIO_SND_D_OUTPUT) + /// [`VIRTIO_SND_D_OUTPUT`] Output = VIRTIO_SND_D_OUTPUT, - /// [`VIRTIO_SND_D_INPUT`](crate::virtio_sound::VIRTIO_SND_D_INPUT) + /// [`VIRTIO_SND_D_INPUT`] Input = VIRTIO_SND_D_INPUT, } diff --git a/vhost-device-sound/src/stream.rs b/vhost-device-sound/src/stream.rs index 36f3b84..3b59032 100644 --- a/vhost-device-sound/src/stream.rs +++ b/vhost-device-sound/src/stream.rs @@ -323,7 +323,7 @@ impl Request { } #[inline] - /// Returns the length of the sound data [`virtio_queue::Descriptor`]. + /// Returns the length of the sound data [`virtio_queue::desc::RawDescriptor`]. pub const fn len(&self) -> usize { self.len }