From c6ed532bef02e752ea881ab104cacc28e5d06738 Mon Sep 17 00:00:00 2001 From: Jan <66554238+vaporoxx@users.noreply.github.com> Date: Wed, 24 May 2023 22:27:10 +0200 Subject: [PATCH] feat: implement `DoubleEndedSearcher` for `CharArray[Ref]Searcher` --- library/core/src/str/pattern.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/str/pattern.rs b/library/core/src/str/pattern.rs index 91ee2903aab43..a31bd1219b978 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] /////////////////////////////////////////////////////////////////////////////