Merge pull request #100 from b52/issue-92-reexport-cast
Re-export `cast` for ergonomic reasons
This commit is contained in:
commit
3f69d7632f
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
/// ```
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue