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:
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user