Skip to content

Commit 0e3485b

Browse files
committed
Use 't lifetime for NoExpand.
This brings the code into sync with the docs. Fixes #312
1 parent 52fdae7 commit 0e3485b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/re_bytes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -991,9 +991,9 @@ impl<F> Replacer for F where F: FnMut(&Captures) -> Vec<u8> {
991991
/// and performant (since capture groups don't need to be found).
992992
///
993993
/// `'t` is the lifetime of the literal text.
994-
pub struct NoExpand<'r>(pub &'r [u8]);
994+
pub struct NoExpand<'t>(pub &'t [u8]);
995995

996-
impl<'a> Replacer for NoExpand<'a> {
996+
impl<'t> Replacer for NoExpand<'t> {
997997
fn replace_append(&mut self, _: &Captures, dst: &mut Vec<u8>) {
998998
dst.extend_from_slice(self.0);
999999
}

src/re_unicode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,9 +1190,9 @@ impl<F> Replacer for F where F: FnMut(&Captures) -> String {
11901190
/// and performant (since capture groups don't need to be found).
11911191
///
11921192
/// `'t` is the lifetime of the literal text.
1193-
pub struct NoExpand<'r>(pub &'r str);
1193+
pub struct NoExpand<'t>(pub &'t str);
11941194

1195-
impl<'a> Replacer for NoExpand<'a> {
1195+
impl<'t> Replacer for NoExpand<'t> {
11961196
fn replace_append(&mut self, _: &Captures, dst: &mut String) {
11971197
dst.push_str(self.0);
11981198
}

0 commit comments

Comments
 (0)