We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ac8628 commit fb6b970Copy full SHA for fb6b970
src/libstd/io/mod.rs
@@ -24,7 +24,6 @@ use error::Error as StdError;
24
use fmt;
25
use iter::Iterator;
26
use marker::Sized;
27
-use mem;
28
use ops::{Drop, FnOnce};
29
use option::Option::{self, Some, None};
30
use ptr::PtrExt;
@@ -69,8 +68,8 @@ fn with_end_to_cap<F>(v: &mut Vec<u8>, f: F) -> Result<usize>
69
68
unsafe {
70
let n = try!(f({
71
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()))
+ black_box(slice::from_raw_parts_mut(base,
+ v.capacity() - v.len()))
74
}));
75
76
// If the closure (typically a `read` implementation) reported that it
0 commit comments