Lines Matching refs:bufs
71 bufs: &mut [IoSliceMut], in recv_into_bufs()
87 fn advance_slices(bufs: &mut &mut [&[u8]], mut count: usize) { in advance_slices()
91 for b in bufs.iter() { in advance_slices()
98 *bufs = &mut take(bufs)[idx..]; in advance_slices()
99 if !bufs.is_empty() { in advance_slices()
100 bufs[0] = &bufs[0][count..]; in advance_slices()
106 fn advance_slices_mut(bufs: &mut &mut [&mut [u8]], mut count: usize) { in advance_slices_mut()
110 for b in bufs.iter() { in advance_slices_mut()
117 *bufs = &mut take(bufs)[idx..]; in advance_slices_mut()
118 if !bufs.is_empty() { in advance_slices_mut()
119 let slice = take(&mut bufs[0]); in advance_slices_mut()
121 bufs[0] = remaining; in advance_slices_mut()
291 mut bufs: &mut [&mut [u8]], in recv_into_bufs_all()
293 let data_total: usize = bufs.iter().map(|b| b.len()).sum(); in recv_into_bufs_all()
298 let mut slices: Vec<IoSliceMut> = bufs.iter_mut().map(|b| IoSliceMut::new(b)).collect(); in recv_into_bufs_all()
307 advance_slices_mut(&mut bufs, n); in recv_into_bufs_all()
474 let mut bufs = &mut [&buf1[..], &buf2[..], &buf3[..]][..]; in test_advance_slices() localVariable
475 advance_slices(&mut bufs, 10); in test_advance_slices()
476 assert_eq!(bufs[0], [2; 14].as_ref()); in test_advance_slices()
477 assert_eq!(bufs[1], [3; 8].as_ref()); in test_advance_slices()
486 let mut bufs = &mut [&mut buf1[..], &mut buf2[..], &mut buf3[..]][..]; in test_advance_slices_mut() localVariable
487 advance_slices_mut(&mut bufs, 10); in test_advance_slices_mut()
488 assert_eq!(bufs[0], [2; 14].as_ref()); in test_advance_slices_mut()
489 assert_eq!(bufs[1], [3; 8].as_ref()); in test_advance_slices_mut()