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 @@ -952,8 +952,7 @@ impl ToOwned for OsStr {
952
952
self . to_os_string ( )
953
953
}
954
954
fn clone_into ( & self , target : & mut OsString ) {
955
- target. clear ( ) ;
956
- target. push ( self ) ;
955
+ self . inner . clone_into ( & mut target. inner )
957
956
}
958
957
}
959
958
Original file line number Diff line number Diff line change @@ -147,6 +147,10 @@ impl Slice {
147
147
Buf { inner : buf }
148
148
}
149
149
150
+ pub fn clone_into ( & self , buf : & mut Buf ) {
151
+ self . inner . clone_into ( & mut buf. inner )
152
+ }
153
+
150
154
#[ inline]
151
155
pub fn into_box ( & self ) -> Box < Slice > {
152
156
unsafe { mem:: transmute ( self . inner . into_box ( ) ) }
Original file line number Diff line number Diff line change @@ -162,6 +162,10 @@ impl Slice {
162
162
Buf { inner : self . inner . to_vec ( ) }
163
163
}
164
164
165
+ pub fn clone_into ( & self , buf : & mut Buf ) {
166
+ self . inner . clone_into ( & mut buf. inner )
167
+ }
168
+
165
169
#[ inline]
166
170
pub fn into_box ( & self ) -> Box < Slice > {
167
171
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