diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 11:12:28 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-30 14:08:40 -0700 |
| commit | acd48a2b3e7fcc0372f7718a2fac1cf80e03db95 (patch) | |
| tree | bf57c82936ee2c1e1df23edd0a750ec6aa75021d /src/libstd/io/buffered.rs | |
| parent | 14192d6df5cc714e5c9a3ca70b08f2514d977be2 (diff) | |
| download | rust-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/buffered.rs')
| -rw-r--r-- | src/libstd/io/buffered.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 98581fc43f8..8eea06bf6b0 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -177,8 +177,8 @@ impl<W: Write> BufWriter<W> { if written > 0 { // NB: would be better expressed as .remove(0..n) if it existed unsafe { - ptr::copy(self.buf.as_mut_ptr(), - self.buf.as_ptr().offset(written as isize), + ptr::copy(self.buf.as_ptr().offset(written as isize), + self.buf.as_mut_ptr(), len - written); } } |
