mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -12,7 +12,7 @@ path = "lib.rs"
|
|||
[dependencies]
|
||||
heapsize = "0.3.0"
|
||||
heapsize_plugin = "0.1.2"
|
||||
num = "0.1.24"
|
||||
num-traits = "0.1.32"
|
||||
rustc-serialize = "0.3"
|
||||
serde = "0.7"
|
||||
serde_macros = "0.7"
|
||||
|
|
|
@ -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