Fix cargo doc

Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
Alyssa Ross 2025-09-16 19:39:11 +02:00 committed by Manos Pitsidianakis
parent caaac9a6fd
commit c5ce9db691
6 changed files with 14 additions and 15 deletions

View File

@ -69,7 +69,7 @@ struct GpioArgs {
socket_count: usize,
/// List of GPIO devices, one for each guest, in the format
/// [s]<N1>[:[s]<N2>].
/// `[s]<N1>[:[s]<N2>]`.
#[clap(short = 'l', long)]
device_list: String,
}

View File

@ -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],
}

View File

@ -67,8 +67,7 @@ struct I2cArgs {
socket_count: usize,
/// List of I2C bus and clients in format
/// <bus-name>:<client_addr>[:<client_addr>][,<bus-name>:<client_addr>[:
/// <client_addr>]].
/// `<bus-name>:<client_addr>[:<client_addr>][,<bus-name>:<client_addr>[:<client_addr>]]`.
#[clap(short = 'l', long)]
device_list: String,
}

View File

@ -171,7 +171,7 @@ enum IioEndian {
}
/// Representation of an IIO channel axis's scan type.
/// It is read from sysfs "scan_element/<channel>_type"
/// It is read from sysfs "scan_element/\<channel>_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/<channel>_type"
/// The ChanScanType is parsed from "scan_elements/\<channel>_type"
scan_type: Option<ChanScanType>,
}

View File

@ -77,9 +77,9 @@ pub type Result<T> = std::result::Result<T, Error>;
#[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,
}

View File

@ -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
}