From 785e07d83ccb6f315a0096e058cd82a27fc9bbac Mon Sep 17 00:00:00 2001 From: Oliver Mader Date: Tue, 26 May 2015 15:03:34 +0200 Subject: [PATCH] Re-export `cast` for ergonomic reasons --- src/lib.rs | 2 +- src/traits.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 94477c4..23be173 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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; diff --git a/src/traits.rs b/src/traits.rs index 61374b5..49dc3cf 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -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); /// ``` ///