From b1e4984c55e1398eb686a01ee35863ae88a8bb25 Mon Sep 17 00:00:00 2001 From: Michael Dorst Date: Wed, 29 Dec 2021 17:38:12 +0000 Subject: [PATCH] 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. --- crates/bevy_reflect/src/list.rs | 2 +- crates/bevy_reflect/src/map.rs | 6 +++--- crates/bevy_reflect/src/type_registry.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs index 2ecb8f52b2c82..da7cf72ac1920 100644 --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -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>; diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs index f87e369113f54..ddb74d8e177c0 100644 --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -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>; diff --git a/crates/bevy_reflect/src/type_registry.rs b/crates/bevy_reflect/src/type_registry.rs index 0a4394516dd3b..48c7e95ea7a9f 100644 --- a/crates/bevy_reflect/src/type_registry.rs +++ b/crates/bevy_reflect/src/type_registry.rs @@ -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 { fn from_type() -> Self; }