Skip to content

Commit

Permalink
Fix doc_markdown lints in bevy_reflect (bevyengine#3478)
Browse files Browse the repository at this point in the history
bevyengine#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.
  • Loading branch information
mfdorst authored and mockersf committed Jan 1, 2022
1 parent fbffec9 commit 85acea7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_reflect/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_reflect/src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_reflect/src/type_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 85acea7

Please sign in to comment.