Skip to content

Commit 68a5835

Browse files
Fix typos found by codespell (#6)
1 parent 12de123 commit 68a5835

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

codecs/linear-quantize/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ pub fn quantize<
527527
let mut encoded: Vec<Q> =
528528
vec![Q::ZERO; (header.len() + std::mem::size_of::<Q>() - 1) / std::mem::size_of::<Q>()];
529529
#[allow(unsafe_code)]
530-
// Safety: encoded is at least header.len() bytes long and propely aligned for Q
530+
// Safety: encoded is at least header.len() bytes long and properly aligned for Q
531531
unsafe {
532532
std::ptr::copy_nonoverlapping(header.as_ptr(), encoded.as_mut_ptr().cast(), header.len());
533533
}
@@ -558,7 +558,7 @@ pub fn reconstruct<T: Float + DeserializeOwned, Q: Unsigned>(
558558
floatify: impl Fn(Q) -> T,
559559
) -> Result<ArrayD<T>, LinearQuantizeCodecError> {
560560
#[allow(unsafe_code)]
561-
// Safety: data is data.len()*size_of::<Q> bytes long and propely aligned for Q
561+
// Safety: data is data.len()*size_of::<Q> bytes long and properly aligned for Q
562562
let (header, remaining) = postcard::take_from_bytes::<CompressionHeader<T>>(unsafe {
563563
std::slice::from_raw_parts(encoded.as_ptr().cast(), std::mem::size_of_val(encoded))
564564
})
@@ -598,7 +598,7 @@ pub fn reconstruct_into<T: Float + DeserializeOwned, Q: Unsigned>(
598598
floatify: impl Fn(Q) -> T,
599599
) -> Result<(), LinearQuantizeCodecError> {
600600
#[allow(unsafe_code)]
601-
// Safety: data is data.len()*size_of::<Q> bytes long and propely aligned for Q
601+
// Safety: data is data.len()*size_of::<Q> bytes long and properly aligned for Q
602602
let (header, remaining) = postcard::take_from_bytes::<CompressionHeader<T>>(unsafe {
603603
std::slice::from_raw_parts(encoded.as_ptr().cast(), std::mem::size_of_val(encoded))
604604
})

crates/numcodecs-python/src/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl PyCodecRegistry {
3636

3737
/// Register a codec class.
3838
///
39-
/// If the `codec_id` is provided, it is used insted of
39+
/// If the `codec_id` is provided, it is used instead of
4040
/// [`PyCodecClassMethods::codec_id`].
4141
///
4242
/// This function maintains a mapping from codec identifiers to codec

crates/numcodecs/src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ where
368368
}
369369
}
370370

371-
/// Perform an elementwise assigment to `self` from `src`.
371+
/// Perform an elementwise assignment to `self` from `src`.
372372
///
373373
/// # Errors
374374
///

crates/numcodecs/src/codec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl<T: StaticCodec> DynCodecType for StaticCodecType<T> {
175175
pub struct StaticCodecConfig<'a, T: StaticCodec> {
176176
#[serde(default)]
177177
id: StaticCodecId<T>,
178-
/// The configration parameters
178+
/// The configuration parameters
179179
#[serde(flatten)]
180180
#[serde(borrow)]
181181
pub config: T::Config<'a>,

0 commit comments

Comments
 (0)