File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use at_vec;
20
20
use cast;
21
21
use char;
22
22
use char:: Char ;
23
- use clone:: Clone ;
23
+ use clone:: { Clone , DeepClone } ;
24
24
use container:: { Container , Mutable } ;
25
25
use iter:: Times ;
26
26
use iterator:: { Iterator , FromIterator , Extendable } ;
@@ -2104,13 +2104,27 @@ impl Clone for ~str {
2104
2104
}
2105
2105
}
2106
2106
2107
+ impl DeepClone for ~str {
2108
+ #[inline]
2109
+ fn deep_clone(&self) -> ~str {
2110
+ self.to_owned()
2111
+ }
2112
+ }
2113
+
2107
2114
impl Clone for @str {
2108
2115
#[inline]
2109
2116
fn clone(&self) -> @str {
2110
2117
*self
2111
2118
}
2112
2119
}
2113
2120
2121
+ impl DeepClone for @str {
2122
+ #[inline]
2123
+ fn deep_clone(&self) -> @str {
2124
+ *self
2125
+ }
2126
+ }
2127
+
2114
2128
impl FromIterator<char> for ~str {
2115
2129
#[inline]
2116
2130
fn from_iterator<T: Iterator<char>>(iterator: &mut T) -> ~str {
You can’t perform that action at this time.
0 commit comments