about summary refs log tree commit diff
path: root/src/libstd/io/cursor.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-27 11:12:28 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-30 14:08:40 -0700
commitacd48a2b3e7fcc0372f7718a2fac1cf80e03db95 (patch)
treebf57c82936ee2c1e1df23edd0a750ec6aa75021d /src/libstd/io/cursor.rs
parent14192d6df5cc714e5c9a3ca70b08f2514d977be2 (diff)
downloadrust-acd48a2b3e7fcc0372f7718a2fac1cf80e03db95.tar.gz
rust-acd48a2b3e7fcc0372f7718a2fac1cf80e03db95.zip
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]
Diffstat (limited to 'src/libstd/io/cursor.rs')
-rw-r--r--src/libstd/io/cursor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs
index 79f0af670b4..c8a41beecbc 100644
--- a/src/libstd/io/cursor.rs
+++ b/src/libstd/io/cursor.rs
@@ -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