1
Fork 0

std: Replace num::IntConvertible with {To,From}Primitive

This commit is contained in:
Erick Tryzelaar 2013-09-15 09:50:17 -07:00
parent 17548378a7
commit d9d1dfc195
14 changed files with 580 additions and 321 deletions

View file

@ -16,7 +16,7 @@ pub trait NumExt: Eq + Ord + Num + NumCast {}
impl NumExt for f32 {}
fn num_eq_one<T:NumExt>(n: T) {
println!("{}", n == NumCast::from(1))
println!("{}", n == NumCast::from(1).unwrap())
}
pub fn main() {