mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Use lexical-core instead of lexical
This commit is contained in:
6 files changed
+14
-41
No files matched your search
Generated
+10
-36
@@ -63,15 +63,6 @@ version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
|
||||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
version = "0.4.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9"
|
||||
dependencies = [
|
||||
"nodrop",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
version = "0.5.1"
|
||||
@@ -160,7 +151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"arrayvec 0.5.1",
|
||||
"arrayvec",
|
||||
"constant_time_eq",
|
||||
]
|
||||
|
||||
@@ -762,26 +753,15 @@ version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "lexical"
|
||||
version = "4.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0afaeae1c07c575338ef6809875bfea8daa9ea8b2ee381ef1f93ba0c6e32f003"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"lexical-core",
|
||||
"rustc_version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lexical-core"
|
||||
version = "0.6.2"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7043aa5c05dd34fb73b47acb8c3708eac428de4545ea3682ed2f11293ebd890"
|
||||
checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.12",
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
"rustc_version",
|
||||
"ryu",
|
||||
"static_assertions",
|
||||
]
|
||||
@@ -899,12 +879,6 @@ dependencies = [
|
||||
"void",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nodrop"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
|
||||
|
||||
[[package]]
|
||||
name = "num-bigint"
|
||||
version = "0.3.0"
|
||||
@@ -1362,7 +1336,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"hexf-parse",
|
||||
"lexical",
|
||||
"lexical-core",
|
||||
"num-bigint",
|
||||
"num-traits",
|
||||
"parking_lot",
|
||||
@@ -1373,7 +1347,7 @@ dependencies = [
|
||||
name = "rustpython-compiler"
|
||||
version = "0.1.2"
|
||||
dependencies = [
|
||||
"arrayvec 0.5.1",
|
||||
"arrayvec",
|
||||
"indexmap",
|
||||
"itertools 0.8.2",
|
||||
"log",
|
||||
@@ -1451,7 +1425,7 @@ dependencies = [
|
||||
"indexmap",
|
||||
"is-macro",
|
||||
"itertools 0.8.2",
|
||||
"lexical",
|
||||
"lexical-core",
|
||||
"libc",
|
||||
"libz-sys",
|
||||
"log",
|
||||
@@ -1704,9 +1678,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "0.3.4"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "statrs"
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ threading = ["parking_lot"]
|
||||
parking_lot = { version = "0.11.0", optional = true }
|
||||
num-traits = "0.2"
|
||||
num-bigint = "0.3"
|
||||
lexical = "4"
|
||||
lexical-core = "0.7"
|
||||
hexf-parse = "0.1.0"
|
||||
cfg-if = "0.1"
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ pub fn parse_str(literal: &str) -> Option<f64> {
|
||||
last_tok = Some(c);
|
||||
}
|
||||
|
||||
if let Ok(f) = lexical::parse(buf.as_str()) {
|
||||
if let Ok(f) = lexical_core::parse(buf.as_bytes()) {
|
||||
Some(f)
|
||||
} else {
|
||||
None
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ statrs = "0.12.0"
|
||||
caseless = "0.2.1"
|
||||
chrono = { version = "0.4", features = ["wasmbind"] }
|
||||
once_cell = "1.3.1"
|
||||
lexical = "4"
|
||||
lexical-core = "0.7"
|
||||
itertools = "0.8"
|
||||
hex = "0.4.0"
|
||||
hexf-parse = "0.1.0"
|
||||
|
||||
@@ -20,7 +20,6 @@ extern crate flamer;
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
extern crate lexical;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
|
||||
@@ -513,7 +513,7 @@ fn to_float(vm: &VirtualMachine, obj: &PyObjectRef) -> PyResult<f64> {
|
||||
vm.new_value_error(format!("could not convert string to float: '{}'", s))
|
||||
})?
|
||||
} else if let Some(bytes) = obj.payload_if_subclass::<PyBytes>(vm) {
|
||||
lexical::parse(bytes.get_value()).map_err(|_| {
|
||||
lexical_core::parse(bytes.get_value()).map_err(|_| {
|
||||
vm.new_value_error(format!(
|
||||
"could not convert string to float: '{}'",
|
||||
bytes.repr()
|
||||
|
||||
Reference in new issue
Block a user