Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doc_markdown lints in bevy_crevice #3470

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions crates/bevy_crevice/src/std140/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ pub unsafe trait Std140: Copy + Zeroable + Pod {
/// See <https://www.khronos.org/registry/OpenGL/specs/gl/glspec45.core.pdf#page=159>
/// (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<Self, {align_offset(size_of::<Self>(), max(16, ALIGNMENT))}>;
/// `type Padded = Std140Padded<Self, {align_offset(size_of::<Self>(), max(16, ALIGNMENT))}>;`
type Padded: Std140Convertible<Self>;

/// Casts the type to a byte array. Implementors should not override this
Expand All @@ -39,11 +40,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<T: Std140>: 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;
}

Expand Down
7 changes: 4 additions & 3 deletions crates/bevy_crevice/src/std430/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub unsafe trait Std430: Copy + Zeroable + Pod {
/// See <https://www.khronos.org/registry/OpenGL/specs/gl/glspec45.core.pdf#page=159>
/// (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<Self, {align_offset(size_of::<Self>(), ALIGNMENT)}>;
/// `type Padded = Std430Padded<Self, {align_offset(size_of::<Self>(), ALIGNMENT)}>;`
type Padded: Std430Convertible<Self>;

/// Casts the type to a byte array. Implementors should not override this
Expand All @@ -39,7 +39,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<T: Std430>: Copy {
/// Convert from self to Std430
fn into_std430(self) -> T;
Expand Down