Skip to content

Commit

Permalink
Auto merge of #317 - BurntSushi:fixes, r=BurntSushi
Browse files Browse the repository at this point in the history
Fixes for #312 and #316
  • Loading branch information
bors committed Jan 2, 2017
2 parents fc639cf + c4d7fa9 commit 0aa891a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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

0 comments on commit 0aa891a

Please sign in to comment.