Skip to content

Commit fb6b970

Browse files
committed
Replace one more slice::from_raw_mut_buf added with new io
1 parent 3ac8628 commit fb6b970

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: src/libstd/io/mod.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use error::Error as StdError;
2424
use fmt;
2525
use iter::Iterator;
2626
use marker::Sized;
27-
use mem;
2827
use ops::{Drop, FnOnce};
2928
use option::Option::{self, Some, None};
3029
use ptr::PtrExt;
@@ -69,8 +68,8 @@ fn with_end_to_cap<F>(v: &mut Vec<u8>, f: F) -> Result<usize>
6968
unsafe {
7069
let n = try!(f({
7170
let base = v.as_mut_ptr().offset(v.len() as isize);
72-
black_box(slice::from_raw_mut_buf(mem::copy_lifetime(v, &base),
73-
v.capacity() - v.len()))
71+
black_box(slice::from_raw_parts_mut(base,
72+
v.capacity() - v.len()))
7473
}));
7574

7675
// If the closure (typically a `read` implementation) reported that it

0 commit comments

Comments
 (0)