diff --git a/base/src/custom_serde.rs b/base/src/custom_serde.rs index 129392d500..c2391f0441 100644 --- a/base/src/custom_serde.rs +++ b/base/src/custom_serde.rs @@ -14,7 +14,7 @@ use serde::Serialize; use serde::Serializer; use sync::Mutex; -/// Serialize data T inside an Arc>. T must be serializable. +/// Serialize data `T` inside an `Arc>`. `T` must be serializable. /// /// NOTE: This does not validate already serialized Mutexes and data. If multiple structs contain a /// clone of the Arc, and they are all being serialized, this will result in the same data being diff --git a/crosvm_control/src/lib.rs b/crosvm_control/src/lib.rs index 9d495f151c..3153dc88cc 100644 --- a/crosvm_control/src/lib.rs +++ b/crosvm_control/src/lib.rs @@ -446,8 +446,8 @@ pub unsafe extern "C" fn crosvm_client_resize_disk( .unwrap_or(false) } -/// Similar to internally used `BalloonStats` but using i64 instead of -/// Option. `None` (or values bigger than i64::max) will be encoded as -1. +/// Similar to internally used `BalloonStats` but using `i64` instead of +/// `Option`. `None` (or values bigger than `i64::max`) will be encoded as -1. #[repr(C)] pub struct BalloonStatsFfi { swap_in: i64, diff --git a/devices/src/bus.rs b/devices/src/bus.rs index bdd82d975a..a2364234a0 100644 --- a/devices/src/bus.rs +++ b/devices/src/bus.rs @@ -71,7 +71,7 @@ pub struct ConfigWriteResult { pub io_add: Vec, /// Device specified at PciAddress will be removed after this config write - /// - 'Vec>': specified device will be removed after this config write + /// - `Vec>`: specified device will be removed after this config write pub removed_pci_devices: Vec, } diff --git a/devices/src/tsc/calibrate.rs b/devices/src/tsc/calibrate.rs index bb5a18278f..64ce56cc86 100644 --- a/devices/src/tsc/calibrate.rs +++ b/devices/src/tsc/calibrate.rs @@ -34,7 +34,7 @@ pub enum TscCalibrationError { SetCpuAffinityError { core: usize, err: base::Error }, } -/// Get the standard deviation of a Vec. +/// Get the standard deviation of a `Vec`. pub fn standard_deviation(items: &[T]) -> f64 { let sum: T = items.iter().fold(T::zero(), |acc: T, elem| acc + *elem); let count = items.len(); diff --git a/media/cros-codecs/src/decoders/h264/dpb.rs b/media/cros-codecs/src/decoders/h264/dpb.rs index c97227b800..a0b8cbdf85 100644 --- a/media/cros-codecs/src/decoders/h264/dpb.rs +++ b/media/cros-codecs/src/decoders/h264/dpb.rs @@ -365,7 +365,7 @@ impl Dpb { self.interlaced = interlaced; } - /// Gets a Vec of short term refs into `out` + /// Gets a `Vec` of short term refs into `out` pub fn get_short_term_refs(&self, out: &mut Vec>) { out.extend( self.entries @@ -375,7 +375,7 @@ impl Dpb { ) } - /// Gets a Vec of long term refs into `out` + /// Gets a `Vec` of long term refs into `out` pub fn get_long_term_refs(&self, out: &mut Vec>) { out.extend( self.entries