File tree 4 files changed +13
-2
lines changed
4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1120,8 +1120,7 @@ impl ToOwned for OsStr {
1120
1120
self . to_os_string ( )
1121
1121
}
1122
1122
fn clone_into ( & self , target : & mut OsString ) {
1123
- target. clear ( ) ;
1124
- target. push ( self ) ;
1123
+ self . inner . clone_into ( & mut target. inner )
1125
1124
}
1126
1125
}
1127
1126
Original file line number Diff line number Diff line change @@ -159,6 +159,10 @@ impl Slice {
159
159
Buf { inner : buf }
160
160
}
161
161
162
+ pub fn clone_into ( & self , buf : & mut Buf ) {
163
+ self . inner . clone_into ( & mut buf. inner )
164
+ }
165
+
162
166
#[ inline]
163
167
pub fn into_box ( & self ) -> Box < Slice > {
164
168
unsafe { mem:: transmute ( self . inner . into_box ( ) ) }
Original file line number Diff line number Diff line change @@ -173,6 +173,10 @@ impl Slice {
173
173
Buf { inner : self . inner . to_vec ( ) }
174
174
}
175
175
176
+ pub fn clone_into ( & self , buf : & mut Buf ) {
177
+ self . inner . clone_into ( & mut buf. inner )
178
+ }
179
+
176
180
#[ inline]
177
181
pub fn into_box ( & self ) -> Box < Slice > {
178
182
let boxed: Box < [ u8 ] > = self . inner . into ( ) ;
Original file line number Diff line number Diff line change @@ -613,6 +613,10 @@ impl Wtf8 {
613
613
}
614
614
}
615
615
616
+ pub fn clone_into ( & self , buf : & mut Wtf8Buf ) {
617
+ self . bytes . clone_into ( & mut buf. bytes )
618
+ }
619
+
616
620
/// Boxes this `Wtf8`.
617
621
#[ inline]
618
622
pub fn into_box ( & self ) -> Box < Wtf8 > {
You can’t perform that action at this time.
0 commit comments