Fix doc_markdown lints in bevy_reflect (#3478)

#3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time.

This PR fixes lints in the `bevy_reflect` crate.
This commit is contained in:
Michael Dorst 2021-12-29 17:38:12 +00:00
parent a90c080659
commit b1e4984c55
3 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@ use std::any::Any;
use crate::{serde::Serializable, Reflect, ReflectMut, ReflectRef};
/// An ordered, mutable list of [Reflect] items. This corresponds to types like [std::vec::Vec].
/// An ordered, mutable list of [Reflect] items. This corresponds to types like [`std::vec::Vec`].
pub trait List: Reflect {
fn get(&self, index: usize) -> Option<&dyn Reflect>;
fn get_mut(&mut self, index: usize) -> Option<&mut dyn Reflect>;

View File

@ -4,9 +4,9 @@ use bevy_utils::HashMap;
use crate::{serde::Serializable, Reflect, ReflectMut, ReflectRef};
/// An ordered ReflectValue->ReflectValue mapping. ReflectValue Keys are assumed to return a
/// non-None hash. Ideally the ordering is stable across runs, but this is not required.
/// This corresponds to types like [std::collections::HashMap].
/// An ordered `ReflectValue->ReflectValue` mapping. `ReflectValue` `Keys` are assumed to return a
/// non-`None` hash. Ideally the ordering is stable across runs, but this is not required.
/// This corresponds to types like [`std::collections::HashMap`].
pub trait Map: Reflect {
fn get(&self, key: &dyn Reflect) -> Option<&dyn Reflect>;
fn get_mut(&mut self, key: &dyn Reflect) -> Option<&mut dyn Reflect>;

View File

@ -219,10 +219,10 @@ where
}
}
/// Trait used to generate `TypeData` for trait reflection.
/// Trait used to generate [`TypeData`] for trait reflection.
///
/// This is used by the `#[derive(Reflect)]` macro to generate an implementation of [TypeData]
/// to pass to [TypeRegistration::insert].
/// This is used by the `#[derive(Reflect)]` macro to generate an implementation of [`TypeData`]
/// to pass to [`TypeRegistration::insert`].
pub trait FromType<T> {
fn from_type() -> Self;
}