diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-17 23:45:55 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-21 15:23:54 -0700 |
| commit | a568a7f9f2eb3fa3f3e049df288ef0ad32cc7881 (patch) | |
| tree | 2d96b295e43de338e7e650110ba00ac2e116b519 /src/libcollections | |
| parent | 0791f9f406053d84dc7136c2be015a469304d7f0 (diff) | |
| download | rust-a568a7f9f2eb3fa3f3e049df288ef0ad32cc7881.tar.gz rust-a568a7f9f2eb3fa3f3e049df288ef0ad32cc7881.zip | |
std: Bring back f32::from_str_radix as an unstable API
This API was exercised in a few tests and mirrors the `from_str_radix` functionality of the integer types.
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/bit.rs | 1 | ||||
| -rw-r--r-- | src/libcollections/fmt.rs | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index d12b979e084..bb90363bc1d 100644 --- a/src/libcollections/bit.rs +++ b/src/libcollections/bit.rs @@ -40,7 +40,6 @@ //! ``` //! # #![feature(collections, core, step_by)] //! use std::collections::{BitSet, BitVec}; -//! use std::num::Float; //! use std::iter; //! //! let max_prime = 10000; diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index 80942754c7b..d8a0e4daf43 100644 --- a/src/libcollections/fmt.rs +++ b/src/libcollections/fmt.rs @@ -175,7 +175,6 @@ //! # #![feature(core, std_misc)] //! use std::fmt; //! use std::f64; -//! use std::num::Float; //! //! #[derive(Debug)] //! struct Vector2D { @@ -200,10 +199,11 @@ //! let magnitude = magnitude.sqrt(); //! //! // Respect the formatting flags by using the helper method -//! // `pad_integral` on the Formatter object. See the method documentation -//! // for details, and the function `pad` can be used to pad strings. +//! // `pad_integral` on the Formatter object. See the method +//! // documentation for details, and the function `pad` can be used +//! // to pad strings. //! let decimals = f.precision().unwrap_or(3); -//! let string = f64::to_str_exact(magnitude, decimals); +//! let string = format!("{:.*}", decimals, magnitude); //! f.pad_integral(true, "", &string) //! } //! } |
