Skip to content

Commit

Permalink
Correct typos in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tsnoam authored and shepmaster committed Sep 13, 2022
1 parent f9346e7 commit 4c42031
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ where
/// A convenience type that can be used in a constant or static.
pub type AsciiCharsConst = AsciiChars<fn(u8) -> bool>;

/// Searches a slice for the first occurence of the subslice.
/// Searches a slice for the first occurrence of the subslice.
pub enum ByteSubstring<T> {
#[cfg(any(jetscii_sse4_2 = "yes", jetscii_sse4_2 = "maybe"))]
SIMD(simd::ByteSubstring<T>),
Expand Down Expand Up @@ -301,7 +301,7 @@ where
}
}

/// Searches the slice for the first occurence of the subslice.
/// Searches the slice for the first occurrence of the subslice.
#[inline]
pub fn find(&self, haystack: &[u8]) -> Option<usize> {
match self {
Expand Down Expand Up @@ -340,7 +340,7 @@ where
self.0.needle_len()
}

/// Searches the string for the first occurence of the substring.
/// Searches the string for the first occurrence of the substring.
#[inline]
pub fn find(&self, haystack: &str) -> Option<usize> {
self.0.find(haystack.as_bytes())
Expand Down

0 comments on commit 4c42031

Please sign in to comment.