std: Standardize (input, output) param orderings
This functions swaps the order of arguments to a few functions that previously took (output, input) parameters, but now take (input, output) parameters (in that order). The affected functions are: * ptr::copy * ptr::copy_nonoverlapping * slice::bytes::copy_memory * intrinsics::copy * intrinsics::copy_nonoverlapping Closes #22890 [breaking-change]
This commit is contained in:
@@ -151,7 +151,7 @@ impl Write for Cursor<Vec<u8>> {
|
||||
// there (left), and what will be appended on the end (right)
|
||||
let space = self.inner.len() - pos as usize;
|
||||
let (left, right) = buf.split_at(cmp::min(space, buf.len()));
|
||||
slice::bytes::copy_memory(&mut self.inner[(pos as usize)..], left);
|
||||
slice::bytes::copy_memory(left, &mut self.inner[(pos as usize)..]);
|
||||
self.inner.push_all(right);
|
||||
|
||||
// Bump us forward
|
||||
|
||||
Reference in New Issue
Block a user