Re-export `cast` for ergonomic reasons
This commit is contained in:
parent
a6a399d52e
commit
785e07d83c
|
@ -57,7 +57,7 @@ pub use integer::Integer;
|
||||||
pub use iter::{range, range_inclusive, range_step, range_step_inclusive};
|
pub use iter::{range, range_inclusive, range_step, range_step_inclusive};
|
||||||
pub use traits::{Num, Zero, One, Signed, Unsigned, Bounded,
|
pub use traits::{Num, Zero, One, Signed, Unsigned, Bounded,
|
||||||
Saturating, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv,
|
Saturating, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv,
|
||||||
PrimInt, Float, ToPrimitive, FromPrimitive, NumCast};
|
PrimInt, Float, ToPrimitive, FromPrimitive, NumCast, cast};
|
||||||
|
|
||||||
#[cfg(test)] use std::hash;
|
#[cfg(test)] use std::hash;
|
||||||
|
|
||||||
|
|
|
@ -1293,7 +1293,7 @@ impl_from_primitive! { f64, to_f64 }
|
||||||
/// ```
|
/// ```
|
||||||
/// use num;
|
/// use num;
|
||||||
///
|
///
|
||||||
/// let twenty: f32 = num::traits::cast(0x14).unwrap();
|
/// let twenty: f32 = num::cast(0x14).unwrap();
|
||||||
/// assert_eq!(twenty, 20f32);
|
/// assert_eq!(twenty, 20f32);
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue