Skip to content

Commit

Permalink
feat: implement DoubleEndedSearcher for CharArray[Ref]Searcher
Browse files Browse the repository at this point in the history
  • Loading branch information
vaporoxx authored May 24, 2023
1 parent 97d3280 commit c6ed532
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/core/src/str/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,8 @@ unsafe impl<'a, const N: usize> ReverseSearcher<'a> for CharArraySearcher<'a, N>
searcher_methods!(reverse);
}

impl<'a, const N: usize> DoubleEndedSearcher<'a> for CharArraySearcher<'a, N> {}

/// Searches for chars that are equal to any of the [`char`]s in the array.
///
/// # Examples
Expand All @@ -826,6 +828,8 @@ unsafe impl<'a, 'b, const N: usize> ReverseSearcher<'a> for CharArrayRefSearcher
searcher_methods!(reverse);
}

impl<'a, 'b, const N: usize> DoubleEndedSearcher<'a> for CharArrayRefSearcher<'a, 'b, N> {}

/////////////////////////////////////////////////////////////////////////////
// Impl for &[char]
/////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit c6ed532

Please sign in to comment.