diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c7ecfcfe4..b45a27950a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ Breaking changes for the regex API: * The `RegexBuilder` type has switched from owned `self` method receivers to `&mut self` method receivers. Most uses will continue to work unchanged, but some code may require naming an intermediate variable to hold the builder. +* The `compile` method on `RegexBuilder` has been renamed to `build`. * The free `is_match` function has been removed. It is replaced by compiling a `Regex` and calling its `is_match` method. * The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied diff --git a/src/re_bytes.rs b/src/re_bytes.rs index 4204bfbe86..0702277193 100644 --- a/src/re_bytes.rs +++ b/src/re_bytes.rs @@ -991,9 +991,9 @@ impl Replacer for F where F: FnMut(&Captures) -> Vec { /// and performant (since capture groups don't need to be found). /// /// `'t` is the lifetime of the literal text. -pub struct NoExpand<'r>(pub &'r [u8]); +pub struct NoExpand<'t>(pub &'t [u8]); -impl<'a> Replacer for NoExpand<'a> { +impl<'t> Replacer for NoExpand<'t> { fn replace_append(&mut self, _: &Captures, dst: &mut Vec) { dst.extend_from_slice(self.0); } diff --git a/src/re_unicode.rs b/src/re_unicode.rs index aa8b21ef52..3b89daa0d1 100644 --- a/src/re_unicode.rs +++ b/src/re_unicode.rs @@ -1190,9 +1190,9 @@ impl Replacer for F where F: FnMut(&Captures) -> String { /// and performant (since capture groups don't need to be found). /// /// `'t` is the lifetime of the literal text. -pub struct NoExpand<'r>(pub &'r str); +pub struct NoExpand<'t>(pub &'t str); -impl<'a> Replacer for NoExpand<'a> { +impl<'t> Replacer for NoExpand<'t> { fn replace_append(&mut self, _: &Captures, dst: &mut String) { dst.push_str(self.0); }