Skip to content

doc: fix typographical errors #167

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

Merged
Merged
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
6 changes: 3 additions & 3 deletions src/arch/all/memchr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The `One` searcher also provides a [`One::count`] routine for efficiently
counting the number of times a single byte occurs in a haystack. This is
useful, for example, for counting the number of lines in a haystack. This
routine exists because it is usually faster, especially with a high match
count, then using [`One::find`] repeatedly. ([`OneIter`] specializes its
count, than using [`One::find`] repeatedly. ([`OneIter`] specializes its
`Iterator::count` implementation to use this routine.)

Only one, two and three bytes are supported because three bytes is about
Expand Down Expand Up @@ -456,7 +456,7 @@ impl Two {
}

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

// And now we start our search at a guaranteed aligned position.
// The first iteration of the loop below will overlap with the the
// The first iteration of the loop below will overlap with the
// unaligned chunk above in cases where the search starts at an
// unaligned offset, but that's okay as we're only here if that
// above didn't find a match.
Expand Down
2 changes: 1 addition & 1 deletion src/arch/generic/memchr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Generic crate-internal routines for the `memchr` family of functions.
//
// While the routine below is fairly long and perhaps intimidating, the basic
// idea is actually very simple and can be expressed straight-forwardly in
// pseudo code. The psuedo code below is written for 128 bit vectors, but the
// pseudo code. The pseudo code below is written for 128 bit vectors, but the
// actual code below works for anything that implements the Vector trait.
//
// needle = (n1 << 15) | (n1 << 14) | ... | (n1 << 1) | n1
Expand Down
4 changes: 2 additions & 2 deletions src/arch/x86_64/memchr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ the CPU supports.
///
/// # Safety
///
/// Primarily callers must that `$fnty` is a correct function pointer type and
/// not something else.
/// Primarily callers must ensure that `$fnty` is a correct function pointer
/// type and not something else.
///
/// Callers must also ensure that `$memchrty::$memchrfind` corresponds to a
/// routine that returns a valid function pointer when a match is found. That
Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86_64/sse2/memchr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The `One` searcher also provides a [`One::count`] routine for efficiently
counting the number of times a single byte occurs in a haystack. This is
useful, for example, for counting the number of lines in a haystack. This
routine exists because it is usually faster, especially with a high match
count, then using [`One::find`] repeatedly. ([`OneIter`] specializes its
count, than using [`One::find`] repeatedly. ([`OneIter`] specializes its
`Iterator::count` implementation to use this routine.)

Only one, two and three bytes are supported because three bytes is about
Expand Down
4 changes: 2 additions & 2 deletions src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub(crate) trait Vector: Copy + core::fmt::Debug {
/// a slightly different representation. We could do extra work to unify the
/// representations, but then would require additional costs in the hot path
/// for `memchr` and `packedpair`. So instead, we abstraction over the specific
/// representation with this trait an ddefine the operations we actually need.
/// representation with this trait and define the operations we actually need.
pub(crate) trait MoveMask: Copy + core::fmt::Debug {
/// Return a mask that is all zeros except for the least significant `n`
/// lanes in a corresponding vector.
Expand Down Expand Up @@ -344,7 +344,7 @@ mod aarch64neon {

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