std: Replace num::IntConvertible with {To,From}Primitive
This commit is contained in:
parent
17548378a7
commit
d9d1dfc195
14 changed files with 580 additions and 321 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue