diff options
| author | Chris Peterson <cpeterson@mozilla.com> | 2012-12-23 14:37:44 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-12-24 18:29:02 -0800 |
| commit | c1e58aad70f01667145bfefd2c3eebe834156dc1 (patch) | |
| tree | fe0938cb3edfa504eb0502aa7bdd766b715e0db7 /src/libcore/float.rs | |
| parent | 889df548865c87bb79be595a7130f21b13f220a3 (diff) | |
| download | rust-c1e58aad70f01667145bfefd2c3eebe834156dc1.tar.gz rust-c1e58aad70f01667145bfefd2c3eebe834156dc1.zip | |
core: Mark some functions as pure
Diffstat (limited to 'src/libcore/float.rs')
| -rw-r--r-- | src/libcore/float.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/float.rs b/src/libcore/float.rs index 8450251c618..d7d68582aef 100644 --- a/src/libcore/float.rs +++ b/src/libcore/float.rs @@ -188,7 +188,7 @@ pub pure fn to_str_common(num: float, digits: uint, exact: bool) -> ~str { * * num - The float value * * digits - The number of significant digits */ -pub fn to_str_exact(num: float, digits: uint) -> ~str { +pub pure fn to_str_exact(num: float, digits: uint) -> ~str { to_str_common(num, digits, true) } @@ -238,7 +238,7 @@ pub pure fn to_str(num: float, digits: uint) -> ~str { * `none` if the string did not represent a valid number. Otherwise, * `Some(n)` where `n` is the floating-point number represented by `[num]`. */ -pub fn from_str(num: &str) -> Option<float> { +pub pure fn from_str(num: &str) -> Option<float> { if num == "inf" { return Some(infinity as float); } else if num == "-inf" { |
