diff options
| author | Kevin Ballard <kevin@sb.org> | 2014-05-28 20:45:44 -0700 | 
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2014-05-28 21:31:19 -0700 | 
| commit | eb98c9eeaa6d1054c4d27611a3cf2d26b0708705 (patch) | |
| tree | 03c8bb992bdd40223de8e03462e7900eaf8023fd /src/libregex/re.rs | |
| parent | 812785e01aef46b0c62bfc02080f8fcc13f01a4c (diff) | |
| download | rust-eb98c9eeaa6d1054c4d27611a3cf2d26b0708705.tar.gz rust-eb98c9eeaa6d1054c4d27611a3cf2d26b0708705.zip | |
Replace StrAllocating.into_owned() with .into_string()
We already have into_string(), but it was implemented in terms of into_owned(). Flip it around and deprecate into_owned(). Remove a few spurious calls to .into_owned() that existed in libregex and librustdoc.
Diffstat (limited to 'src/libregex/re.rs')
| -rw-r--r-- | src/libregex/re.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/libregex/re.rs b/src/libregex/re.rs index 5958089a8a4..190e37c6436 100644 --- a/src/libregex/re.rs +++ b/src/libregex/re.rs @@ -573,13 +573,13 @@ impl<'t> Replacer for NoExpand<'t> { impl<'t> Replacer for &'t str { fn reg_replace<'a>(&'a mut self, caps: &Captures) -> MaybeOwned<'a> { - Owned(caps.expand(*self).into_owned()) + Owned(caps.expand(*self)) } } impl<'a> Replacer for |&Captures|: 'a -> String { fn reg_replace<'r>(&'r mut self, caps: &Captures) -> MaybeOwned<'r> { - Owned((*self)(caps).into_owned()) + Owned((*self)(caps)) } } | 
