Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for #312 and #316 #317

Merged
merged 2 commits into from
Jan 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/re_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,9 +991,9 @@ impl<F> Replacer for F where F: FnMut(&Captures) -> Vec<u8> {
/// 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<u8>) {
dst.extend_from_slice(self.0);
}
Expand Down
4 changes: 2 additions & 2 deletions src/re_unicode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1190,9 +1190,9 @@ impl<F> 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);
}
Expand Down