From 30428ec88f66c3da56f4ad42368ea81da9aebd6a Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Sat, 20 Aug 2016 22:30:02 -0500 Subject: [PATCH] Use mem::swap to swap variables --- library/compiler-builtins/src/float/add.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/compiler-builtins/src/float/add.rs b/library/compiler-builtins/src/float/add.rs index 3fffac35d7b5..f36e0c1e3f54 100644 --- a/library/compiler-builtins/src/float/add.rs +++ b/library/compiler-builtins/src/float/add.rs @@ -74,9 +74,7 @@ macro_rules! add { // Swap a and b if necessary so that a has the larger absolute value. if b_abs > a_abs { - let temp = a_rep; - a_rep = b_rep; - b_rep = temp; + ::core::mem::swap(&mut a_rep, &mut b_rep); } // Extract the exponent and significand from the (possibly swapped) a and b.