about summary refs log tree commit diff
path: root/src/libregex/re.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libregex/re.rs')
-rw-r--r--src/libregex/re.rs4
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))
     }
 }