about summary refs log tree commit diff
path: root/src/libstd/num/strconv.rs
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-04-18 13:49:37 +1000
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-04-19 10:44:08 +1000
commitbed70a42ecf0747f924c813b3b375d5fd364ffc3 (patch)
treee11c369051a4cc265995b2657aac14443e697eec /src/libstd/num/strconv.rs
parentfe472020347d8eeb727f3a31e9cdc7268bb579f6 (diff)
downloadrust-bed70a42ecf0747f924c813b3b375d5fd364ffc3.tar.gz
rust-bed70a42ecf0747f924c813b3b375d5fd364ffc3.zip
Have floating point functions take their parameters by value.
Make all of the methods in `std::num::Float` take `self` and their other parameters by value.

Some of the `Float` methods took their parameters by value, and others took them by reference. This standardises them to one convention. The `Float` trait is intended for the built in IEEE 754 numbers only so we don't have to worry about the trait serving types of larger sizes.

[breaking-change]
Diffstat (limited to 'src/libstd/num/strconv.rs')
-rw-r--r--src/libstd/num/strconv.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index 73dfbdd088e..bb2fd2a4e25 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -310,7 +310,7 @@ pub fn float_to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Float+
                     ExpNone => unreachable!()
                 };
 
-                (num / exp_base.powf(&exp), cast::<T, i32>(exp).unwrap())
+                (num / exp_base.powf(exp), cast::<T, i32>(exp).unwrap())
             }
         }
     };