Re-export `cast` for ergonomic reasons

This commit is contained in:
Oliver Mader 2015-05-26 15:03:34 +02:00
parent a6a399d52e
commit 785e07d83c
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);
/// ```
///