From 708a30d092633f64554503783d010828755b9ac4 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 14 Mar 2024 23:56:01 +0700 Subject: [PATCH] Fix typos. --- src/core/alignment_value.rs | 2 +- src/core/size_value.rs | 2 +- src/types/matrix.rs | 4 ++-- src/types/runtime_sized_array.rs | 4 ++-- src/types/vector.rs | 4 ++-- src/types/wrapper.rs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/alignment_value.rs b/src/core/alignment_value.rs index a6da57d..18392c4 100644 --- a/src/core/alignment_value.rs +++ b/src/core/alignment_value.rs @@ -18,7 +18,7 @@ impl AlignmentValue { #[inline] pub const fn from_next_power_of_two_size(size: SizeValue) -> Self { match size.get().checked_next_power_of_two() { - None => panic!("Overflow occured while getting the next power of 2!"), + None => panic!("Overflow occurred while getting the next power of 2!"), Some(val) => { // SAFETY: This is safe since we got the next_power_of_two Self(unsafe { NonZeroU64::new_unchecked(val) }) diff --git a/src/core/size_value.rs b/src/core/size_value.rs index b87bb79..8ae0e03 100644 --- a/src/core/size_value.rs +++ b/src/core/size_value.rs @@ -29,7 +29,7 @@ impl SizeValue { #[inline] pub const fn mul(self, rhs: u64) -> Self { match self.get().checked_mul(rhs) { - None => panic!("Overflow occured while multiplying size values!"), + None => panic!("Overflow occurred while multiplying size values!"), Some(val) => { // SAFETY: This is safe since we checked for overflow Self(unsafe { NonZeroU64::new_unchecked(val) }) diff --git a/src/types/matrix.rs b/src/types/matrix.rs index be593b5..44eed7e 100644 --- a/src/types/matrix.rs +++ b/src/types/matrix.rs @@ -24,7 +24,7 @@ pub trait AsMutMatrixParts { fn as_mut_parts(&mut self) -> &mut [[T; R]; C]; } -/// Enables the cration of a matrix (via `[[T; R]; C]`) +/// Enables the creation of a matrix (via `[[T; R]; C]`) pub trait FromMatrixParts { fn from_parts(parts: [[T; R]; C]) -> Self; } @@ -41,7 +41,7 @@ pub trait FromMatrixParts { /// /// - `$r` nr of rows the given matrix contains /// -/// - `$type` the type (representing a matrix) for which `ShaderType` will be imeplemented for +/// - `$type` the type (representing a matrix) for which `ShaderType` will be implemented for /// /// - `$generics` \[optional\] generics that will be passed into the `impl< >` /// diff --git a/src/types/runtime_sized_array.rs b/src/types/runtime_sized_array.rs index 3a787f1..1ebfbc6 100644 --- a/src/types/runtime_sized_array.rs +++ b/src/types/runtime_sized_array.rs @@ -19,7 +19,7 @@ use crate::ShaderType; /// /// - possibly being higher than expected due to padding at the end of a struct or buffer being interpreted as array elements /// -/// - representing the capacity of the array for usecaseses that require oversized buffers +/// - representing the capacity of the array for use cases that require oversized buffers /// /// # Solution /// @@ -75,7 +75,7 @@ pub trait Truncate { /// /// # Args /// -/// - `$type` the type (representing a runtime-sized array) for which `ShaderType` will be imeplemented for +/// - `$type` the type (representing a runtime-sized array) for which `ShaderType` will be implemented for /// /// - `$generics` \[optional\] generics that will be passed into the `impl< >` /// diff --git a/src/types/vector.rs b/src/types/vector.rs index f826144..ab2855f 100644 --- a/src/types/vector.rs +++ b/src/types/vector.rs @@ -13,7 +13,7 @@ pub trait AsMutVectorParts { fn as_mut_parts(&mut self) -> &mut [T; N]; } -/// Enables the cration of a vector (via `[T; N]`) +/// Enables the creation of a vector (via `[T; N]`) pub trait FromVectorParts { fn from_parts(parts: [T; N]) -> Self; } @@ -28,7 +28,7 @@ pub trait FromVectorParts { /// /// - `$n` nr of elements the given vector contains /// -/// - `$type` the type (representing a vector) for which `ShaderType` will be imeplemented for +/// - `$type` the type (representing a vector) for which `ShaderType` will be implemented for /// /// - `$generics` \[optional\] generics that will be passed into the `impl< >` /// diff --git a/src/types/wrapper.rs b/src/types/wrapper.rs index 20d961d..7b39228 100644 --- a/src/types/wrapper.rs +++ b/src/types/wrapper.rs @@ -2,7 +2,7 @@ /// /// # Args /// -/// - `$type` the type (representing a wrapper) for which `ShaderType` will be imeplemented for +/// - `$type` the type (representing a wrapper) for which `ShaderType` will be implemented for /// /// - `$generics` \[optional\] generics that will be passed into the `impl< >` ///