Update iovec dependency (#179)

Update to match master version of IoVec (0.2.0?), using
IoVec/IoVecMut instead of &IoVec and &mut IoVec.
This commit is contained in:
Carl Lerche
2018-01-25 22:02:21 -08:00
committed by GitHub
parent c316c2433d
commit 3d169f1f34
7 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ fn test_bufs_vec() {
let b1: &[u8] = &mut [0];
let b2: &[u8] = &mut [0];
let mut dst: [&IoVec; 2] =
let mut dst: [IoVec; 2] =
[b1.into(), b2.into()];
assert_eq!(1, buf.bytes_vec(&mut dst[..]));
+2 -2
View File
@@ -3,7 +3,7 @@ extern crate byteorder;
extern crate iovec;
use bytes::{BufMut, BytesMut};
use iovec::IoVec;
use iovec::IoVecMut;
use std::usize;
use std::fmt::Write;
@@ -77,7 +77,7 @@ fn test_bufs_vec_mut() {
let mut buf = BytesMut::from(&b"hello world"[..]);
unsafe {
let mut dst: [&mut IoVec; 2] = mem::zeroed();
let mut dst: [IoVecMut; 2] = mem::zeroed();
assert_eq!(1, buf.bytes_vec_mut(&mut dst[..]));
}
}
+4 -4
View File
@@ -59,7 +59,7 @@ fn vectored_read() {
let b2: &[u8] = &mut [0];
let b3: &[u8] = &mut [0];
let b4: &[u8] = &mut [0];
let mut iovecs: [&IoVec; 4] =
let mut iovecs: [IoVec; 4] =
[b1.into(), b2.into(), b3.into(), b4.into()];
assert_eq!(2, buf.bytes_vec(&mut iovecs));
@@ -76,7 +76,7 @@ fn vectored_read() {
let b2: &[u8] = &mut [0];
let b3: &[u8] = &mut [0];
let b4: &[u8] = &mut [0];
let mut iovecs: [&IoVec; 4] =
let mut iovecs: [IoVec; 4] =
[b1.into(), b2.into(), b3.into(), b4.into()];
assert_eq!(2, buf.bytes_vec(&mut iovecs));
@@ -93,7 +93,7 @@ fn vectored_read() {
let b2: &[u8] = &mut [0];
let b3: &[u8] = &mut [0];
let b4: &[u8] = &mut [0];
let mut iovecs: [&IoVec; 4] =
let mut iovecs: [IoVec; 4] =
[b1.into(), b2.into(), b3.into(), b4.into()];
assert_eq!(1, buf.bytes_vec(&mut iovecs));
@@ -110,7 +110,7 @@ fn vectored_read() {
let b2: &[u8] = &mut [0];
let b3: &[u8] = &mut [0];
let b4: &[u8] = &mut [0];
let mut iovecs: [&IoVec; 4] =
let mut iovecs: [IoVec; 4] =
[b1.into(), b2.into(), b3.into(), b4.into()];
assert_eq!(1, buf.bytes_vec(&mut iovecs));