diff options
| author | Jan <66554238+vaporoxx@users.noreply.github.com> | 2023-05-24 22:27:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-24 22:27:10 +0200 |
| commit | c6ed532bef02e752ea881ab104cacc28e5d06738 (patch) | |
| tree | e827cef92fd55d51b3d2ad696c2e51e6ce3f40ff | |
| parent | 97d328012b9ed9b7d481c40e84aa1f2c65b33ec8 (diff) | |
| download | rust-c6ed532bef02e752ea881ab104cacc28e5d06738.tar.gz rust-c6ed532bef02e752ea881ab104cacc28e5d06738.zip | |
feat: implement `DoubleEndedSearcher` for `CharArray[Ref]Searcher`
| -rw-r--r-- | library/core/src/str/pattern.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/core/src/str/pattern.rs b/library/core/src/str/pattern.rs index 91ee2903aab..a31bd1219b9 100644 --- a/library/core/src/str/pattern.rs +++ b/library/core/src/str/pattern.rs @@ -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 @@ -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] ///////////////////////////////////////////////////////////////////////////// |
