Rollup merge of #31989 - Kimundi:more_flexible_str_pattern_indirection, r=bluss
This allows a bit more flexibility in how to use it, see the included test case.
This commit is contained in:
@@ -492,7 +492,7 @@ impl<'a, F> Pattern<'a> for F where F: FnMut(char) -> bool {
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Delegates to the `&str` impl.
|
||||
impl<'a, 'b> Pattern<'a> for &'b &'b str {
|
||||
impl<'a, 'b, 'c> Pattern<'a> for &'c &'b str {
|
||||
pattern_methods!(StrSearcher<'a, 'b>, |&s| s, |s| s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user