Skip to content

Commit a7dbafe

Browse files
doc: fix typographical errors
PR #167
1 parent a26dd5b commit a7dbafe

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/arch/all/memchr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The `One` searcher also provides a [`One::count`] routine for efficiently
1313
counting the number of times a single byte occurs in a haystack. This is
1414
useful, for example, for counting the number of lines in a haystack. This
1515
routine exists because it is usually faster, especially with a high match
16-
count, then using [`One::find`] repeatedly. ([`OneIter`] specializes its
16+
count, than using [`One::find`] repeatedly. ([`OneIter`] specializes its
1717
`Iterator::count` implementation to use this routine.)
1818
1919
Only one, two and three bytes are supported because three bytes is about
@@ -456,7 +456,7 @@ impl Two {
456456
}
457457

458458
// And now we start our search at a guaranteed aligned position.
459-
// The first iteration of the loop below will overlap with the the
459+
// The first iteration of the loop below will overlap with the
460460
// unaligned chunk above in cases where the search starts at an
461461
// unaligned offset, but that's okay as we're only here if that
462462
// above didn't find a match.
@@ -720,7 +720,7 @@ impl Three {
720720
}
721721

722722
// And now we start our search at a guaranteed aligned position.
723-
// The first iteration of the loop below will overlap with the the
723+
// The first iteration of the loop below will overlap with the
724724
// unaligned chunk above in cases where the search starts at an
725725
// unaligned offset, but that's okay as we're only here if that
726726
// above didn't find a match.

src/arch/generic/memchr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Generic crate-internal routines for the `memchr` family of functions.
1212
//
1313
// While the routine below is fairly long and perhaps intimidating, the basic
1414
// idea is actually very simple and can be expressed straight-forwardly in
15-
// pseudo code. The psuedo code below is written for 128 bit vectors, but the
15+
// pseudo code. The pseudo code below is written for 128 bit vectors, but the
1616
// actual code below works for anything that implements the Vector trait.
1717
//
1818
// needle = (n1 << 15) | (n1 << 14) | ... | (n1 << 1) | n1

src/arch/x86_64/memchr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ the CPU supports.
4646
///
4747
/// # Safety
4848
///
49-
/// Primarily callers must that `$fnty` is a correct function pointer type and
50-
/// not something else.
49+
/// Primarily callers must ensure that `$fnty` is a correct function pointer
50+
/// type and not something else.
5151
///
5252
/// Callers must also ensure that `$memchrty::$memchrfind` corresponds to a
5353
/// routine that returns a valid function pointer when a match is found. That

src/arch/x86_64/sse2/memchr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `One` searcher also provides a [`One::count`] routine for efficiently
1010
counting the number of times a single byte occurs in a haystack. This is
1111
useful, for example, for counting the number of lines in a haystack. This
1212
routine exists because it is usually faster, especially with a high match
13-
count, then using [`One::find`] repeatedly. ([`OneIter`] specializes its
13+
count, than using [`One::find`] repeatedly. ([`OneIter`] specializes its
1414
`Iterator::count` implementation to use this routine.)
1515
1616
Only one, two and three bytes are supported because three bytes is about

src/vector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub(crate) trait Vector: Copy + core::fmt::Debug {
7878
/// a slightly different representation. We could do extra work to unify the
7979
/// representations, but then would require additional costs in the hot path
8080
/// for `memchr` and `packedpair`. So instead, we abstraction over the specific
81-
/// representation with this trait an ddefine the operations we actually need.
81+
/// representation with this trait and define the operations we actually need.
8282
pub(crate) trait MoveMask: Copy + core::fmt::Debug {
8383
/// Return a mask that is all zeros except for the least significant `n`
8484
/// lanes in a corresponding vector.
@@ -344,7 +344,7 @@ mod aarch64neon {
344344

345345
/// This is the only interesting implementation of this routine.
346346
/// Basically, instead of doing the "shift right narrow" dance, we use
347-
/// adajacent folding max to determine whether there are any non-zero
347+
/// adjacent folding max to determine whether there are any non-zero
348348
/// bytes in our mask. If there are, *then* we'll do the "shift right
349349
/// narrow" dance. In benchmarks, this does lead to slightly better
350350
/// throughput, but the win doesn't appear huge.

0 commit comments

Comments
 (0)