@@ -290,12 +290,6 @@ impl BatchContainer for OffsetList {
290
290
self . push ( item. 0 ) ;
291
291
}
292
292
293
- fn copy_slice ( & mut self , slice : & [ Self :: PushItem ] ) {
294
- for index in slice {
295
- self . push ( * index) ;
296
- }
297
- }
298
-
299
293
fn copy_range ( & mut self , other : & Self , start : usize , end : usize ) {
300
294
for offset in start..end {
301
295
self . push ( other. index ( offset) ) ;
@@ -306,10 +300,6 @@ impl BatchContainer for OffsetList {
306
300
Self :: with_capacity ( size)
307
301
}
308
302
309
- fn reserve ( & mut self , _additional : usize ) {
310
- // Nop
311
- }
312
-
313
303
fn merge_capacity ( cont1 : & Self , cont2 : & Self ) -> Self {
314
304
Self :: with_capacity ( cont1. len ( ) + cont2. len ( ) )
315
305
}
@@ -347,14 +337,10 @@ pub mod containers {
347
337
fn copy_push ( & mut self , item : & Self :: PushItem ) ;
348
338
/// Inserts a borrowed item.
349
339
fn copy ( & mut self , item : Self :: ReadItem < ' _ > ) ;
350
- /// Extends from a slice of items.
351
- fn copy_slice ( & mut self , slice : & [ Self :: PushItem ] ) ;
352
340
/// Extends from a range of items in another`Self`.
353
341
fn copy_range ( & mut self , other : & Self , start : usize , end : usize ) ;
354
342
/// Creates a new container with sufficient capacity.
355
343
fn with_capacity ( size : usize ) -> Self ;
356
- /// Reserves additional capacity.
357
- fn reserve ( & mut self , additional : usize ) ;
358
344
/// Creates a new container with sufficient capacity.
359
345
fn merge_capacity ( cont1 : & Self , cont2 : & Self ) -> Self ;
360
346
@@ -432,18 +418,12 @@ pub mod containers {
432
418
fn copy ( & mut self , item : & T ) {
433
419
self . push ( item. clone ( ) ) ;
434
420
}
435
- fn copy_slice ( & mut self , slice : & [ T ] ) {
436
- self . extend_from_slice ( slice) ;
437
- }
438
421
fn copy_range ( & mut self , other : & Self , start : usize , end : usize ) {
439
422
self . extend_from_slice ( & other[ start .. end] ) ;
440
423
}
441
424
fn with_capacity ( size : usize ) -> Self {
442
425
Vec :: with_capacity ( size)
443
426
}
444
- fn reserve ( & mut self , additional : usize ) {
445
- self . reserve ( additional) ;
446
- }
447
427
fn merge_capacity ( cont1 : & Self , cont2 : & Self ) -> Self {
448
428
Vec :: with_capacity ( cont1. len ( ) + cont2. len ( ) )
449
429
}
@@ -470,12 +450,6 @@ pub mod containers {
470
450
fn copy ( & mut self , item : & T ) {
471
451
self . copy ( item) ;
472
452
}
473
- fn copy_slice ( & mut self , slice : & [ Self :: PushItem ] ) {
474
- self . reserve_items ( slice. iter ( ) ) ;
475
- for item in slice. iter ( ) {
476
- self . copy ( item) ;
477
- }
478
- }
479
453
fn copy_range ( & mut self , other : & Self , start : usize , end : usize ) {
480
454
let slice = & other[ start .. end] ;
481
455
self . reserve_items ( slice. iter ( ) ) ;
@@ -486,8 +460,6 @@ pub mod containers {
486
460
fn with_capacity ( size : usize ) -> Self {
487
461
Self :: with_capacity ( size)
488
462
}
489
- fn reserve ( & mut self , _additional : usize ) {
490
- }
491
463
fn merge_capacity ( cont1 : & Self , cont2 : & Self ) -> Self {
492
464
let mut new = Self :: default ( ) ;
493
465
new. reserve_regions ( std:: iter:: once ( cont1) . chain ( std:: iter:: once ( cont2) ) ) ;
@@ -533,11 +505,6 @@ pub mod containers {
533
505
}
534
506
self . offsets . push ( self . inner . len ( ) ) ;
535
507
}
536
- fn copy_slice ( & mut self , slice : & [ Vec < B > ] ) {
537
- for item in slice {
538
- self . copy ( item) ;
539
- }
540
- }
541
508
fn copy_range ( & mut self , other : & Self , start : usize , end : usize ) {
542
509
for index in start .. end {
543
510
self . copy ( other. index ( index) ) ;
@@ -551,8 +518,6 @@ pub mod containers {
551
518
inner : Vec :: with_capacity ( size) ,
552
519
}
553
520
}
554
- fn reserve ( & mut self , _additional : usize ) {
555
- }
556
521
fn merge_capacity ( cont1 : & Self , cont2 : & Self ) -> Self {
557
522
let mut offsets = Vec :: with_capacity ( cont1. inner . len ( ) + cont2. inner . len ( ) + 1 ) ;
558
523
offsets. push ( 0 ) ;
@@ -640,8 +605,6 @@ pub mod containers {
640
605
}
641
606
}
642
607
}
643
-
644
-
645
608
646
609
impl < B > BatchContainer for SliceContainer2 < B >
647
610
where
@@ -664,11 +627,6 @@ pub mod containers {
664
627
}
665
628
self . offsets . push ( self . inner . len ( ) ) ;
666
629
}
667
- fn copy_slice ( & mut self , slice : & [ Vec < B > ] ) {
668
- for item in slice {
669
- self . copy_push ( item) ;
670
- }
671
- }
672
630
fn copy_range ( & mut self , other : & Self , start : usize , end : usize ) {
673
631
for index in start .. end {
674
632
self . copy ( other. index ( index) ) ;
@@ -683,8 +641,6 @@ pub mod containers {
683
641
inner : Vec :: with_capacity ( size) ,
684
642
}
685
643
}
686
- fn reserve ( & mut self , _additional : usize ) {
687
- }
688
644
fn merge_capacity ( cont1 : & Self , cont2 : & Self ) -> Self {
689
645
let mut offsets = Vec :: with_capacity ( cont1. inner . len ( ) + cont2. inner . len ( ) + 1 ) ;
690
646
offsets. push ( 0 ) ;
0 commit comments