mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Use num-traits in range.
This commit is contained in:
parent
552f5ae892
commit
91a29b6f92
5 changed files with 6 additions and 6 deletions
|
@ -13,7 +13,7 @@
|
|||
#![deny(unsafe_code)]
|
||||
|
||||
extern crate heapsize;
|
||||
extern crate num as num_lib;
|
||||
extern crate num_traits;
|
||||
extern crate rustc_serialize;
|
||||
extern crate serde;
|
||||
|
||||
|
@ -43,7 +43,7 @@ impl Int for isize {
|
|||
#[inline]
|
||||
fn max_value() -> isize { ::std::isize::MAX }
|
||||
#[inline]
|
||||
fn from_usize(n: usize) -> Option<isize> { num_lib::NumCast::from(n) }
|
||||
fn from_usize(n: usize) -> Option<isize> { num_traits::NumCast::from(n) }
|
||||
}
|
||||
impl Int for usize {
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue