Merge pull request #100 from b52/issue-92-reexport-cast

Re-export `cast` for ergonomic reasons
This commit is contained in:
Alex Crichton 2015-05-26 07:23:13 -07:00
commit 3f69d7632f
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ pub use integer::Integer;
pub use iter::{range, range_inclusive, range_step, range_step_inclusive};
pub use traits::{Num, Zero, One, Signed, Unsigned, Bounded,
Saturating, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv,
PrimInt, Float, ToPrimitive, FromPrimitive, NumCast};
PrimInt, Float, ToPrimitive, FromPrimitive, NumCast, cast};
#[cfg(test)] use std::hash;

View File

@ -1293,7 +1293,7 @@ impl_from_primitive! { f64, to_f64 }
/// ```
/// use num;
///
/// let twenty: f32 = num::traits::cast(0x14).unwrap();
/// let twenty: f32 = num::cast(0x14).unwrap();
/// assert_eq!(twenty, 20f32);
/// ```
///