From acd48a2b3e7fcc0372f7718a2fac1cf80e03db95 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 27 Mar 2015 11:12:28 -0700 Subject: 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] --- src/libstd/collections/hash/table.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/collections') diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index 8f659334538..aa3195cbf01 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -480,8 +480,8 @@ impl>> GapThenFull { pub fn shift(mut self) -> Option> { unsafe { *self.gap.raw.hash = mem::replace(&mut *self.full.raw.hash, EMPTY_BUCKET); - ptr::copy_nonoverlapping(self.gap.raw.key, self.full.raw.key, 1); - ptr::copy_nonoverlapping(self.gap.raw.val, self.full.raw.val, 1); + ptr::copy_nonoverlapping(self.full.raw.key, self.gap.raw.key, 1); + ptr::copy_nonoverlapping(self.full.raw.val, self.gap.raw.val, 1); } let FullBucket { raw: prev_raw, idx: prev_idx, .. } = self.full; -- cgit 1.4.1-3-g733a5