diff --git a/Cargo.lock b/Cargo.lock index 235183ac1..df9bfd9e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/common/Cargo.toml b/common/Cargo.toml index b8603397a..951660bfb 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -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" diff --git a/common/src/float_ops.rs b/common/src/float_ops.rs index 34f2c4e6a..d7ebadee2 100644 --- a/common/src/float_ops.rs +++ b/common/src/float_ops.rs @@ -72,7 +72,7 @@ pub fn parse_str(literal: &str) -> Option { 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 diff --git a/vm/Cargo.toml b/vm/Cargo.toml index ccd5bbdf0..05c21cd8e 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -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" diff --git a/vm/src/lib.rs b/vm/src/lib.rs index 80724fd85..014515018 100644 --- a/vm/src/lib.rs +++ b/vm/src/lib.rs @@ -20,7 +20,6 @@ extern crate flamer; #[macro_use] extern crate bitflags; -extern crate lexical; #[macro_use] extern crate log; #[macro_use] diff --git a/vm/src/obj/objfloat.rs b/vm/src/obj/objfloat.rs index dab3fe265..d3c162f5a 100644 --- a/vm/src/obj/objfloat.rs +++ b/vm/src/obj/objfloat.rs @@ -513,7 +513,7 @@ fn to_float(vm: &VirtualMachine, obj: &PyObjectRef) -> PyResult { vm.new_value_error(format!("could not convert string to float: '{}'", s)) })? } else if let Some(bytes) = obj.payload_if_subclass::(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()