Skip to content

Commit adf66a8

Browse files
committed
fixup! More generic impl of Replacer for closures
Do not use the same lifetime for reference and type parameter of `Captures`.
1 parent 092b770 commit adf66a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/regex/string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2375,15 +2375,15 @@ impl<'c, 'h> core::iter::FusedIterator for SubCaptureMatches<'c, 'h> {}
23752375
/// [`Replacer`].
23762376
pub trait ReplacerClosure<'a>
23772377
where
2378-
Self: FnMut(&'a Captures<'a>) -> <Self as ReplacerClosure>::Output,
2378+
Self: FnMut(&'a Captures<'_>) -> <Self as ReplacerClosure<'a>>::Output,
23792379
{
23802380
/// Return type of the closure (may depend on lifetime `'a`).
23812381
type Output: AsRef<str>;
23822382
}
23832383

23842384
impl<'a, F: ?Sized, O> ReplacerClosure<'a> for F
23852385
where
2386-
F: FnMut(&'a Captures<'a>) -> O,
2386+
F: FnMut(&'a Captures<'_>) -> O,
23872387
O: AsRef<str>,
23882388
{
23892389
type Output = O;

0 commit comments

Comments
 (0)