File tree 5 files changed +7
-24
lines changed
5 files changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -552,23 +552,17 @@ impl OsString {
552
552
OsStr :: from_inner_mut ( self . inner . leak ( ) )
553
553
}
554
554
555
- /// Part of a hack to make PathBuf::push/pop more efficient.
556
- //#[inline]
557
- //pub(crate) fn as_mut_vec_for_path_buf(&mut self) -> &mut Vec<u8> {
558
- // self.inner.as_mut_vec_for_path_buf()
559
- //}
560
-
555
+ /// Provides plumbing to core `Vec::truncate`.
561
556
/// More well behaving alternative to allowing outer types
562
557
/// full mutable access to the core `Vec`.
563
- /// Provides plumbing to core `Vec::truncate`.
564
558
#[ inline]
565
559
pub ( crate ) fn truncate ( & mut self , len : usize ) {
566
560
self . inner . truncate ( len) ;
567
561
}
568
562
563
+ /// Provides plumbing to core `Vec::extend_from_slice`.
569
564
/// More well behaving alternative to allowing outer types
570
565
/// full mutable access to the core `Vec`.
571
- /// Provides plumbing to core `Vec::extend_from_slice`.
572
566
#[ inline]
573
567
pub ( crate ) fn extend_from_slice ( & mut self , other : & [ u8 ] ) {
574
568
self . inner . extend_from_slice ( other) ;
Original file line number Diff line number Diff line change @@ -1163,11 +1163,6 @@ pub struct PathBuf {
1163
1163
}
1164
1164
1165
1165
impl PathBuf {
1166
- //#[inline]
1167
- //fn as_mut_vec(&mut self) -> &mut Vec<u8> {
1168
- // self.inner.as_mut_vec_for_path_buf()
1169
- //}
1170
-
1171
1166
/// Allocates an empty `PathBuf`.
1172
1167
///
1173
1168
/// # Examples
Original file line number Diff line number Diff line change @@ -202,23 +202,17 @@ impl Buf {
202
202
self . as_slice ( ) . into_rc ( )
203
203
}
204
204
205
- /// Part of a hack to make PathBuf::push/pop more efficient.
206
- //#[inline]
207
- //pub(crate) fn as_mut_vec_for_path_buf(&mut self) -> &mut Vec<u8> {
208
- // &mut self.inner
209
- //}
210
-
205
+ /// Provides plumbing to core `Vec::truncate`.
211
206
/// More well behaving alternative to allowing outer types
212
207
/// full mutable access to the core `Vec`.
213
- /// Provides plumbing to core `Vec::truncate`.
214
208
#[ inline]
215
209
pub ( crate ) fn truncate ( & mut self , len : usize ) {
216
210
self . inner . truncate ( len) ;
217
211
}
218
212
213
+ /// Provides plumbing to core `Vec::extend_from_slice`.
219
214
/// More well behaving alternative to allowing outer types
220
215
/// full mutable access to the core `Vec`.
221
- /// Provides plumbing to core `Vec::extend_from_slice`.
222
216
#[ inline]
223
217
pub ( crate ) fn extend_from_slice ( & mut self , other : & [ u8 ] ) {
224
218
self . inner . extend_from_slice ( other) ;
Original file line number Diff line number Diff line change @@ -165,17 +165,17 @@ impl Buf {
165
165
self . as_slice ( ) . into_rc ( )
166
166
}
167
167
168
+ /// Provides plumbing to core `Vec::truncate`.
168
169
/// More well behaving alternative to allowing outer types
169
170
/// full mutable access to the core `Vec`.
170
- /// Provides plumbing to core `Vec::truncate`.
171
171
#[ inline]
172
172
pub ( crate ) fn truncate ( & mut self , len : usize ) {
173
173
self . inner . truncate ( len) ;
174
174
}
175
175
176
+ /// Provides plumbing to core `Vec::extend_from_slice`.
176
177
/// More well behaving alternative to allowing outer types
177
178
/// full mutable access to the core `Vec`.
178
- /// Provides plumbing to core `Vec::extend_from_slice`.
179
179
#[ inline]
180
180
pub ( crate ) fn extend_from_slice ( & mut self , other : & [ u8 ] ) {
181
181
self . inner . extend_from_slice ( other) ;
Original file line number Diff line number Diff line change @@ -474,9 +474,9 @@ impl Wtf8Buf {
474
474
Wtf8Buf { bytes : bytes. into_vec ( ) , is_known_utf8 : false }
475
475
}
476
476
477
+ /// Provides plumbing to core `Vec::extend_from_slice`.
477
478
/// More well behaving alternative to allowing outer types
478
479
/// full mutable access to the core `Vec`.
479
- /// Provides plumbing to core `Vec::extend_from_slice`.
480
480
#[ inline]
481
481
pub ( crate ) fn extend_from_slice ( & mut self , other : & [ u8 ] ) {
482
482
self . bytes . extend_from_slice ( other) ;
You can’t perform that action at this time.
0 commit comments