remove num-traits
This commit is contained in:
parent
80d3ab1b0f
commit
5aa6749241
|
@ -511,7 +511,6 @@ dependencies = [
|
||||||
"insta",
|
"insta",
|
||||||
"itertools",
|
"itertools",
|
||||||
"nac3parser",
|
"nac3parser",
|
||||||
"num-traits",
|
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"rayon",
|
"rayon",
|
||||||
"test-case",
|
"test-case",
|
||||||
|
@ -527,7 +526,6 @@ dependencies = [
|
||||||
"lalrpop-util",
|
"lalrpop-util",
|
||||||
"log",
|
"log",
|
||||||
"nac3ast",
|
"nac3ast",
|
||||||
"num-traits",
|
|
||||||
"phf",
|
"phf",
|
||||||
"unic-emoji-char",
|
"unic-emoji-char",
|
||||||
"unic-ucd-ident",
|
"unic-ucd-ident",
|
||||||
|
@ -550,15 +548,6 @@ version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
|
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num-traits"
|
|
||||||
version = "0.2.14"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num_cpus"
|
name = "num_cpus"
|
||||||
version = "1.13.1"
|
version = "1.13.1"
|
||||||
|
|
|
@ -5,7 +5,6 @@ authors = ["M-Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
num-traits = "0.2"
|
|
||||||
itertools = "0.10.1"
|
itertools = "0.10.1"
|
||||||
crossbeam = "0.8.1"
|
crossbeam = "0.8.1"
|
||||||
parking_lot = "0.11.1"
|
parking_lot = "0.11.1"
|
||||||
|
|
|
@ -14,7 +14,6 @@ lalrpop = "0.19.6"
|
||||||
nac3ast = { path = "../nac3ast" }
|
nac3ast = { path = "../nac3ast" }
|
||||||
lalrpop-util = "0.19.6"
|
lalrpop-util = "0.19.6"
|
||||||
log = "0.4.1"
|
log = "0.4.1"
|
||||||
num-traits = "0.2"
|
|
||||||
unic-emoji-char = "0.9"
|
unic-emoji-char = "0.9"
|
||||||
unic-ucd-ident = "0.9"
|
unic-ucd-ident = "0.9"
|
||||||
unicode_names2 = "0.4"
|
unicode_names2 = "0.4"
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
pub use super::token::Tok;
|
pub use super::token::Tok;
|
||||||
use crate::ast::Location;
|
use crate::ast::Location;
|
||||||
use crate::error::{LexicalError, LexicalErrorType};
|
use crate::error::{LexicalError, LexicalErrorType};
|
||||||
use num_traits::identities::Zero;
|
|
||||||
use std::char;
|
use std::char;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
@ -364,7 +363,7 @@ where
|
||||||
// parse should only fail because of overflow.
|
// parse should only fail because of overflow.
|
||||||
let value = value_text.parse::<i64>().ok();
|
let value = value_text.parse::<i64>().ok();
|
||||||
let nonzero = match value {
|
let nonzero = match value {
|
||||||
Some(value) => !value.is_zero(),
|
Some(value) => value != 0i64,
|
||||||
None => true
|
None => true
|
||||||
};
|
};
|
||||||
if start_is_zero && nonzero {
|
if start_is_zero && nonzero {
|
||||||
|
|
Loading…
Reference in New Issue