From a8055e131a5ad1c71e89f2a9814cfb2e7b88fb05 Mon Sep 17 00:00:00 2001 From: Michael Dorst Date: Tue, 28 Dec 2021 19:02:51 -0800 Subject: [PATCH 1/2] Fix doc_markdown lints in bevy_crevice --- crates/bevy_crevice/src/std140/traits.rs | 14 +++++++++----- crates/bevy_crevice/src/std430/traits.rs | 7 +++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/crates/bevy_crevice/src/std140/traits.rs b/crates/bevy_crevice/src/std140/traits.rs index 392251c3f80ec..6d7687956c87e 100644 --- a/crates/bevy_crevice/src/std140/traits.rs +++ b/crates/bevy_crevice/src/std140/traits.rs @@ -23,9 +23,12 @@ pub unsafe trait Std140: Copy + Zeroable + Pod { /// See /// (rule 4 and 9) const PAD_AT_END: bool = false; - /// Padded type (Std140Padded specialization) + + /// Padded type ([`Std140Padded`] specialization) /// The usual implementation is - /// type Padded = Std140Padded(), max(16, ALIGNMENT))}>; + /// ``` + /// type Padded = Std140Padded(), max(16, ALIGNMENT))}>`; + /// ``` type Padded: Std140Convertible; /// Casts the type to a byte array. Implementors should not override this @@ -39,11 +42,12 @@ pub unsafe trait Std140: Copy + Zeroable + Pod { } } -/// Trait specifically for Std140::Padded, implements conversions between padded type and base type. +/// Trait specifically for [`Std140::Padded`], implements conversions between padded type and base +/// type. pub trait Std140Convertible: Copy { - /// Convert from self to Std140 + /// Convert from `Self` to [`Std140`] fn into_std140(self) -> T; - /// Convert from Std140 to self + /// Convert from [`Std140`] to `Self` fn from_std140(_: T) -> Self; } diff --git a/crates/bevy_crevice/src/std430/traits.rs b/crates/bevy_crevice/src/std430/traits.rs index dfd5ad7d84b8c..bf045270b7089 100644 --- a/crates/bevy_crevice/src/std430/traits.rs +++ b/crates/bevy_crevice/src/std430/traits.rs @@ -23,9 +23,11 @@ pub unsafe trait Std430: Copy + Zeroable + Pod { /// See /// (rule 4 and 9) const PAD_AT_END: bool = false; - /// Padded type (Std430Padded specialization) + /// Padded type ([`Std430Padded`] specialization) /// The usual implementation is + /// ``` /// type Padded = Std430Padded(), ALIGNMENT)}>; + /// ``` type Padded: Std430Convertible; /// Casts the type to a byte array. Implementors should not override this @@ -39,7 +41,8 @@ pub unsafe trait Std430: Copy + Zeroable + Pod { } } -/// Trait specifically for Std430::Padded, implements conversions between padded type and base type. +/// Trait specifically for [`Std430::Padded`], implements conversions between padded type and base +/// type. pub trait Std430Convertible: Copy { /// Convert from self to Std430 fn into_std430(self) -> T; From 2a330232995b0bb4c9dc102f88497f00a30a7da7 Mon Sep 17 00:00:00 2001 From: Michael Dorst Date: Tue, 28 Dec 2021 20:09:47 -0800 Subject: [PATCH 2/2] Use single backticks instead of tripple backticks to avoid code being run in CI --- crates/bevy_crevice/src/std140/traits.rs | 4 +--- crates/bevy_crevice/src/std430/traits.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/bevy_crevice/src/std140/traits.rs b/crates/bevy_crevice/src/std140/traits.rs index 6d7687956c87e..aeb51a0efb362 100644 --- a/crates/bevy_crevice/src/std140/traits.rs +++ b/crates/bevy_crevice/src/std140/traits.rs @@ -26,9 +26,7 @@ pub unsafe trait Std140: Copy + Zeroable + Pod { /// Padded type ([`Std140Padded`] specialization) /// The usual implementation is - /// ``` - /// type Padded = Std140Padded(), max(16, ALIGNMENT))}>`; - /// ``` + /// `type Padded = Std140Padded(), max(16, ALIGNMENT))}>;` type Padded: Std140Convertible; /// Casts the type to a byte array. Implementors should not override this diff --git a/crates/bevy_crevice/src/std430/traits.rs b/crates/bevy_crevice/src/std430/traits.rs index bf045270b7089..bafe825ed70d0 100644 --- a/crates/bevy_crevice/src/std430/traits.rs +++ b/crates/bevy_crevice/src/std430/traits.rs @@ -25,9 +25,7 @@ pub unsafe trait Std430: Copy + Zeroable + Pod { const PAD_AT_END: bool = false; /// Padded type ([`Std430Padded`] specialization) /// The usual implementation is - /// ``` - /// type Padded = Std430Padded(), ALIGNMENT)}>; - /// ``` + /// `type Padded = Std430Padded(), ALIGNMENT)}>;` type Padded: Std430Convertible; /// Casts the type to a byte array. Implementors should not override this