@@ -138,11 +138,13 @@ impl<H, T> HeaderVec<H, T> {
138
138
/// HeaderVec`, this is the method is always exact and can be slightly faster than the non
139
139
/// mutable `len()`.
140
140
#[ cfg( feature = "atomic_append" ) ]
141
+ #[ mutants:: skip]
141
142
#[ inline( always) ]
142
143
pub fn len_exact ( & mut self ) -> usize {
143
144
* self . header_mut ( ) . len . get_mut ( )
144
145
}
145
146
#[ cfg( not( feature = "atomic_append" ) ) ]
147
+ #[ mutants:: skip]
146
148
#[ inline( always) ]
147
149
pub fn len_exact ( & mut self ) -> usize {
148
150
self . header_mut ( ) . len
@@ -152,11 +154,13 @@ impl<H, T> HeaderVec<H, T> {
152
154
/// produce racy results in case another thread atomically appended to
153
155
/// `&self`. Nevertheless it is always safe to use.
154
156
#[ cfg( feature = "atomic_append" ) ]
157
+ #[ mutants:: skip]
155
158
#[ inline( always) ]
156
159
pub fn len ( & self ) -> usize {
157
160
self . len_atomic_relaxed ( )
158
161
}
159
162
#[ cfg( not( feature = "atomic_append" ) ) ]
163
+ #[ mutants:: skip]
160
164
#[ inline( always) ]
161
165
pub fn len ( & self ) -> usize {
162
166
self . header ( ) . len
@@ -168,11 +172,13 @@ impl<H, T> HeaderVec<H, T> {
168
172
/// atomically appends data to this `HeaderVec` while we still work with the result of
169
173
/// this method.
170
174
#[ cfg( not( feature = "atomic_append" ) ) ]
175
+ #[ mutants:: skip]
171
176
#[ inline( always) ]
172
177
pub fn len_strict ( & self ) -> usize {
173
178
self . header ( ) . len
174
179
}
175
180
#[ cfg( feature = "atomic_append" ) ]
181
+ #[ mutants:: skip]
176
182
#[ inline( always) ]
177
183
pub fn len_strict ( & self ) -> usize {
178
184
self . len_atomic_acquire ( )
@@ -283,6 +289,7 @@ impl<H, T> HeaderVec<H, T> {
283
289
}
284
290
285
291
/// Reserves capacity for exactly `additional` more elements to be inserted in the given `HeaderVec`.
292
+ #[ mutants:: skip]
286
293
#[ inline]
287
294
pub fn reserve_exact ( & mut self , additional : usize ) {
288
295
self . reserve_intern ( additional, true , & mut None ) ;
@@ -291,6 +298,7 @@ impl<H, T> HeaderVec<H, T> {
291
298
/// Reserves capacity for exactly `additional` more elements to be inserted in the given `HeaderVec`.
292
299
/// This method must be used when `HeaderVecWeak` are used. It takes a closure that is responsible for
293
300
/// updating the weak references as additional parameter.
301
+ #[ mutants:: skip]
294
302
#[ inline]
295
303
pub fn reserve_exact_with_weakfix ( & mut self , additional : usize , weak_fixup : WeakFixupFn ) {
296
304
self . reserve_intern ( additional, true , & mut Some ( weak_fixup) ) ;
@@ -329,6 +337,7 @@ impl<H, T> HeaderVec<H, T> {
329
337
}
330
338
331
339
/// Resizes the vector hold exactly `self.len()` elements.
340
+ #[ mutants:: skip]
332
341
#[ inline( always) ]
333
342
pub fn shrink_to_fit ( & mut self ) {
334
343
self . shrink_to ( 0 ) ;
@@ -337,6 +346,7 @@ impl<H, T> HeaderVec<H, T> {
337
346
/// Resizes the vector hold exactly `self.len()` elements.
338
347
/// This method must be used when `HeaderVecWeak` are used. It takes a closure that is responsible for
339
348
/// updating the weak references as additional parameter.
349
+ #[ mutants:: skip]
340
350
#[ inline( always) ]
341
351
pub fn shrink_to_fit_with_weakfix ( & mut self , weak_fixup : WeakFixupFn ) {
342
352
self . shrink_to_with_weakfix ( 0 , weak_fixup) ;
@@ -564,6 +574,7 @@ impl<H, T> HeaderVec<H, T> {
564
574
///
565
575
/// [`clear`]: HeaderVec::clear
566
576
/// [`drain`]: HeaderVec::drain
577
+ #[ mutants:: skip]
567
578
pub fn truncate ( & mut self , len : usize ) {
568
579
unsafe {
569
580
let old_len = self . len_exact ( ) ;
@@ -609,6 +620,7 @@ impl<H, T> HeaderVec<H, T> {
609
620
}
610
621
611
622
/// Gives the offset in units of T (as if the pointer started at an array of T) that the slice actually starts at.
623
+ #[ mutants:: skip]
612
624
#[ inline( always) ]
613
625
const fn offset ( ) -> usize {
614
626
// The first location, in units of size_of::<T>(), that is after the header
@@ -1054,6 +1066,7 @@ where
1054
1066
H : Debug ,
1055
1067
T : Debug ,
1056
1068
{
1069
+ #[ mutants:: skip]
1057
1070
fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
1058
1071
f. debug_struct ( "HeaderVec" )
1059
1072
. field ( "header" , & self . header ( ) . head )
0 commit comments