@@ -353,7 +353,7 @@ fn test_read_to_end_capacity() -> io::Result<()> {
353353}
354354
355355#[ test]
356- fn io_slice_mut_advance_slice ( ) {
356+ fn io_slice_mut_advance_slices ( ) {
357357 let mut buf1 = [ 1 ; 8 ] ;
358358 let mut buf2 = [ 2 ; 16 ] ;
359359 let mut buf3 = [ 3 ; 8 ] ;
@@ -364,75 +364,75 @@ fn io_slice_mut_advance_slice() {
364364 ] [ ..] ;
365365
366366 // Only in a single buffer..
367- IoSliceMut :: advance_slice ( & mut bufs, 1 ) ;
367+ IoSliceMut :: advance_slices ( & mut bufs, 1 ) ;
368368 assert_eq ! ( bufs[ 0 ] . deref( ) , [ 1 ; 7 ] . as_ref( ) ) ;
369369 assert_eq ! ( bufs[ 1 ] . deref( ) , [ 2 ; 16 ] . as_ref( ) ) ;
370370 assert_eq ! ( bufs[ 2 ] . deref( ) , [ 3 ; 8 ] . as_ref( ) ) ;
371371
372372 // Removing a buffer, leaving others as is.
373- IoSliceMut :: advance_slice ( & mut bufs, 7 ) ;
373+ IoSliceMut :: advance_slices ( & mut bufs, 7 ) ;
374374 assert_eq ! ( bufs[ 0 ] . deref( ) , [ 2 ; 16 ] . as_ref( ) ) ;
375375 assert_eq ! ( bufs[ 1 ] . deref( ) , [ 3 ; 8 ] . as_ref( ) ) ;
376376
377377 // Removing a buffer and removing from the next buffer.
378- IoSliceMut :: advance_slice ( & mut bufs, 18 ) ;
378+ IoSliceMut :: advance_slices ( & mut bufs, 18 ) ;
379379 assert_eq ! ( bufs[ 0 ] . deref( ) , [ 3 ; 6 ] . as_ref( ) ) ;
380380}
381381
382382#[ test]
383- fn io_slice_mut_advance_slice_empty_slice ( ) {
383+ fn io_slice_mut_advance_slices_empty_slice ( ) {
384384 let mut empty_bufs = & mut [ ] [ ..] ;
385385 // Shouldn't panic.
386- IoSliceMut :: advance_slice ( & mut empty_bufs, 1 ) ;
386+ IoSliceMut :: advance_slices ( & mut empty_bufs, 1 ) ;
387387}
388388
389389#[ test]
390- fn io_slice_mut_advance_slice_beyond_total_length ( ) {
390+ fn io_slice_mut_advance_slices_beyond_total_length ( ) {
391391 let mut buf1 = [ 1 ; 8 ] ;
392392 let mut bufs = & mut [ IoSliceMut :: new ( & mut buf1) ] [ ..] ;
393393
394394 // Going beyond the total length should be ok.
395- IoSliceMut :: advance_slice ( & mut bufs, 9 ) ;
395+ IoSliceMut :: advance_slices ( & mut bufs, 9 ) ;
396396 assert ! ( bufs. is_empty( ) ) ;
397397}
398398
399399#[ test]
400- fn io_slice_advance_slice ( ) {
400+ fn io_slice_advance_slices ( ) {
401401 let buf1 = [ 1 ; 8 ] ;
402402 let buf2 = [ 2 ; 16 ] ;
403403 let buf3 = [ 3 ; 8 ] ;
404404 let mut bufs = & mut [ IoSlice :: new ( & buf1) , IoSlice :: new ( & buf2) , IoSlice :: new ( & buf3) ] [ ..] ;
405405
406406 // Only in a single buffer..
407- IoSlice :: advance_slice ( & mut bufs, 1 ) ;
407+ IoSlice :: advance_slices ( & mut bufs, 1 ) ;
408408 assert_eq ! ( bufs[ 0 ] . deref( ) , [ 1 ; 7 ] . as_ref( ) ) ;
409409 assert_eq ! ( bufs[ 1 ] . deref( ) , [ 2 ; 16 ] . as_ref( ) ) ;
410410 assert_eq ! ( bufs[ 2 ] . deref( ) , [ 3 ; 8 ] . as_ref( ) ) ;
411411
412412 // Removing a buffer, leaving others as is.
413- IoSlice :: advance_slice ( & mut bufs, 7 ) ;
413+ IoSlice :: advance_slices ( & mut bufs, 7 ) ;
414414 assert_eq ! ( bufs[ 0 ] . deref( ) , [ 2 ; 16 ] . as_ref( ) ) ;
415415 assert_eq ! ( bufs[ 1 ] . deref( ) , [ 3 ; 8 ] . as_ref( ) ) ;
416416
417417 // Removing a buffer and removing from the next buffer.
418- IoSlice :: advance_slice ( & mut bufs, 18 ) ;
418+ IoSlice :: advance_slices ( & mut bufs, 18 ) ;
419419 assert_eq ! ( bufs[ 0 ] . deref( ) , [ 3 ; 6 ] . as_ref( ) ) ;
420420}
421421
422422#[ test]
423- fn io_slice_advance_slice_empty_slice ( ) {
423+ fn io_slice_advance_slices_empty_slice ( ) {
424424 let mut empty_bufs = & mut [ ] [ ..] ;
425425 // Shouldn't panic.
426- IoSlice :: advance_slice ( & mut empty_bufs, 1 ) ;
426+ IoSlice :: advance_slices ( & mut empty_bufs, 1 ) ;
427427}
428428
429429#[ test]
430- fn io_slice_advance_slice_beyond_total_length ( ) {
430+ fn io_slice_advance_slices_beyond_total_length ( ) {
431431 let buf1 = [ 1 ; 8 ] ;
432432 let mut bufs = & mut [ IoSlice :: new ( & buf1) ] [ ..] ;
433433
434434 // Going beyond the total length should be ok.
435- IoSlice :: advance_slice ( & mut bufs, 9 ) ;
435+ IoSlice :: advance_slices ( & mut bufs, 9 ) ;
436436 assert ! ( bufs. is_empty( ) ) ;
437437}
438438
0 commit comments