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]
|
||||
|
|
2
components/servo/Cargo.lock
generated
2
components/servo/Cargo.lock
generated
|
@ -1683,7 +1683,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
2
ports/cef/Cargo.lock
generated
2
ports/cef/Cargo.lock
generated
|
@ -1559,7 +1559,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
2
ports/gonk/Cargo.lock
generated
2
ports/gonk/Cargo.lock
generated
|
@ -1541,7 +1541,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue