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:
Alex Crichton
2015-03-27 11:12:28 -07:00
parent 14192d6df5
commit acd48a2b3e
29 changed files with 147 additions and 107 deletions

View File

@@ -344,8 +344,8 @@ impl Wtf8Buf {
Some((surrogate_pos, _)) => {
pos = surrogate_pos + 3;
slice::bytes::copy_memory(
UTF8_REPLACEMENT_CHARACTER,
&mut self.bytes[surrogate_pos .. pos],
UTF8_REPLACEMENT_CHARACTER
);
},
None => return unsafe { String::from_utf8_unchecked(self.bytes) }