Skip to content

Commit c6ed532

Browse files
authored
feat: implement DoubleEndedSearcher for CharArray[Ref]Searcher
1 parent 97d3280 commit c6ed532

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: library/core/src/str/pattern.rs

+4
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,8 @@ unsafe impl<'a, const N: usize> ReverseSearcher<'a> for CharArraySearcher<'a, N>
806806
searcher_methods!(reverse);
807807
}
808808

809+
impl<'a, const N: usize> DoubleEndedSearcher<'a> for CharArraySearcher<'a, N> {}
810+
809811
/// Searches for chars that are equal to any of the [`char`]s in the array.
810812
///
811813
/// # Examples
@@ -826,6 +828,8 @@ unsafe impl<'a, 'b, const N: usize> ReverseSearcher<'a> for CharArrayRefSearcher
826828
searcher_methods!(reverse);
827829
}
828830

831+
impl<'a, 'b, const N: usize> DoubleEndedSearcher<'a> for CharArrayRefSearcher<'a, 'b, N> {}
832+
829833
/////////////////////////////////////////////////////////////////////////////
830834
// Impl for &[char]
831835
/////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)