Fix cargo doc warnings from Rust 1.68

Some type parameters in <> were being mis-parsed as HTML tags.

BUG=b:276487055
TEST=tools/cargo-doc # with rust 1.68.2

Change-Id: Iaa9ec6cf94a6084cfdf323bb04c643396a320889
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4485758
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
Daniel Verkamp 2023-04-27 17:26:14 -07:00 committed by crosvm LUCI
parent 25b8e44250
commit 6eec4b7768
5 changed files with 7 additions and 7 deletions

View file

@ -14,7 +14,7 @@ use serde::Serialize;
use serde::Serializer;
use sync::Mutex;
/// Serialize data T inside an Arc<Mutex<T>>. T must be serializable.
/// Serialize data `T` inside an `Arc<Mutex<T>>`. `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

View file

@ -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<u64>. `None` (or values bigger than i64::max) will be encoded as -1.
/// Similar to internally used `BalloonStats` but using `i64` instead of
/// `Option<u64>`. `None` (or values bigger than `i64::max`) will be encoded as -1.
#[repr(C)]
pub struct BalloonStatsFfi {
swap_in: i64,

View file

@ -71,7 +71,7 @@ pub struct ConfigWriteResult {
pub io_add: Vec<BusRange>,
/// Device specified at PciAddress will be removed after this config write
/// - 'Vec<PciAddress>>': specified device will be removed after this config write
/// - `Vec<PciAddress>>`: specified device will be removed after this config write
pub removed_pci_devices: Vec<PciAddress>,
}

View file

@ -34,7 +34,7 @@ pub enum TscCalibrationError {
SetCpuAffinityError { core: usize, err: base::Error },
}
/// Get the standard deviation of a Vec<T>.
/// Get the standard deviation of a `Vec<T>`.
pub fn standard_deviation<T: num_traits::ToPrimitive + num_traits::Num + Copy>(items: &[T]) -> f64 {
let sum: T = items.iter().fold(T::zero(), |acc: T, elem| acc + *elem);
let count = items.len();

View file

@ -365,7 +365,7 @@ impl<T: DecodedHandle> Dpb<T> {
self.interlaced = interlaced;
}
/// Gets a Vec<ContainedPicture> of short term refs into `out`
/// Gets a `Vec<ContainedPicture>` of short term refs into `out`
pub fn get_short_term_refs(&self, out: &mut Vec<DpbEntry<T>>) {
out.extend(
self.entries
@ -375,7 +375,7 @@ impl<T: DecodedHandle> Dpb<T> {
)
}
/// Gets a Vec<ContainedPicture> of long term refs into `out`
/// Gets a `Vec<ContainedPicture>` of long term refs into `out`
pub fn get_long_term_refs(&self, out: &mut Vec<DpbEntry<T>>) {
out.extend(
self.entries