From a406e626d6ce16964cc9d47da906c5f91d5ce4b4 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 9 Sep 2022 15:43:26 +0300 Subject: [PATCH] Fix `unnecessary-lazy-evaluations` (#21) * Fix `unnecessary-lazy-evaluations` * Version bump * Cleanup --- Cargo.lock | 78 +++++-------------- Cargo.toml | 6 +- crates/marine-build-rs-generator/Cargo.toml | 5 +- crates/marine-build-rs-generator/src/lib.rs | 2 +- crates/marine-test-macro-impl/Cargo.toml | 2 +- .../src/marine_test/utils.rs | 2 +- crates/marine-test-macro/Cargo.toml | 4 +- crates/marine-test-macro/src/lib.rs | 2 +- src/lib.rs | 2 +- 9 files changed, 33 insertions(+), 70 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30f2ddc..2151429 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,17 +77,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cargo_toml" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513d17226888c7b8283ac02a1c1b0d8a9d4cbf6db65dfadb79f598f5d7966fe9" -dependencies = [ - "serde", - "serde_derive", - "toml", -] - [[package]] name = "cc" version = "1.0.70" @@ -390,9 +379,9 @@ dependencies = [ [[package]] name = "fluence-app-service" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0738351c00206d1519a387ba178b60350964645878f044ec636a9a3ec80488" +checksum = "1519a1ece5d14a54046ed5e88155bfea47d209f73a05b32a18cf82e2d8ac5c43" dependencies = [ "log", "maplit", @@ -706,16 +695,16 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "marine-build-rs-generator" -version = "0.7.0" +version = "0.7.1" dependencies = [ "marine-test-macro-impl", ] [[package]] name = "marine-core" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e7bb9fad7d81fbfc79acb20716de3f1d5ccf89f3ea1be7d59541110ccdca42" +checksum = "c18b924984c79fb11a0f989e293c9ba5ba8b1061bc99f2bd45e63d139c2a01b0" dependencies = [ "anyhow", "boolinator", @@ -746,14 +735,13 @@ dependencies = [ [[package]] name = "marine-it-generator" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25eea53765b0886afd41197861c9a2a6a2d09dbd5f723833df35f38a71affa2a" +checksum = "5f68db04cab6cd0afa567251d80b4ef8223b317beffb99323c117bcc4a9773a4" dependencies = [ - "cargo_toml", "it-lilo", "marine-it-parser", - "marine-macro-impl 0.6.15", + "marine-macro-impl", "once_cell", "serde", "serde_json", @@ -797,22 +785,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f21b40612e9da310a6df1e394cc30b4962bb4ddc13ee50faec6d2704861b7b" dependencies = [ - "marine-macro-impl 0.7.0", - "marine-rs-sdk-main 0.7.0", -] - -[[package]] -name = "marine-macro-impl" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdbed3a10ae9b22df06bee8cd0023255358935aae8e8daf9d1a006cfaeeb11e" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn", - "uuid", + "marine-macro-impl", + "marine-rs-sdk-main", ] [[package]] @@ -852,13 +826,13 @@ dependencies = [ [[package]] name = "marine-module-info-parser" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec8f4ab2eeeb5c1d66d9b56fe6b0b5bf39820aa8cc2f1d7be42bdf95654d529" +checksum = "5d85c5353236fdb9a94dc09531d3cef40866df88c27903a432ef32263d5111e4" dependencies = [ "anyhow", "chrono", - "marine-rs-sdk-main 0.6.15", + "marine-rs-sdk-main", "semver 0.11.0", "serde", "thiserror", @@ -890,22 +864,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4208762a010c41a6352a651061fcd1a7bb077c6a3548be8ccd84fe79c3e1ddbd" dependencies = [ "marine-macro", - "marine-rs-sdk-main 0.7.0", + "marine-rs-sdk-main", "marine-timestamp-macro", "polyplets", "serde", ] -[[package]] -name = "marine-rs-sdk-main" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff262801664ce22f9d274504d6e8088c217034aba0ca431eca8d0258f3699c6" -dependencies = [ - "log", - "serde", -] - [[package]] name = "marine-rs-sdk-main" version = "0.7.0" @@ -918,7 +882,7 @@ dependencies = [ [[package]] name = "marine-rs-sdk-test" -version = "0.7.0" +version = "0.7.1" dependencies = [ "fluence-app-service", "marine-build-rs-generator", @@ -931,9 +895,9 @@ dependencies = [ [[package]] name = "marine-runtime" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "638f3d61fd1ac60e585f9db6705daf819ef900d3eb3a8ef1382b53a160fe5ebd" +checksum = "d7ed0ecac893ecc26c925cbe00c6a1eb8ac9f8d9e60ebc9c0bd390fba08617f2" dependencies = [ "bytesize", "cmd_lib", @@ -943,7 +907,7 @@ dependencies = [ "marine-core", "marine-module-interface", "marine-rs-sdk", - "marine-rs-sdk-main 0.7.0", + "marine-rs-sdk-main", "marine-utils", "safe-transmute", "serde", @@ -960,7 +924,7 @@ dependencies = [ [[package]] name = "marine-test-macro" -version = "0.7.0" +version = "0.7.1" dependencies = [ "marine-test-macro-impl", "proc-macro-error", @@ -971,7 +935,7 @@ dependencies = [ [[package]] name = "marine-test-macro-impl" -version = "0.7.0" +version = "0.7.1" dependencies = [ "darling 0.12.4", "fluence-app-service", @@ -1157,7 +1121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "407811d09f3e0fb2086060afdfbad2e6bb5b63c300edeec93358bb5b8a8e4257" dependencies = [ "marine-macro", - "marine-rs-sdk-main 0.7.0", + "marine-rs-sdk-main", "serde", ] diff --git a/Cargo.toml b/Cargo.toml index ba76281..314b6cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marine-rs-sdk-test" -version = "0.7.0" # remember to update html_root_url +version = "0.7.1" # remember to update html_root_url description = "Backend SDK that allows testing modules for the Marine runtime" documentation = "https://docs.rs/marine-rs-sdk-test" repository = "https://github.com/fluencelabs/marine-rs-sdk-test" @@ -21,8 +21,8 @@ doctest = false trybuild = "1.0" [dependencies] -marine-test-macro = { path = "crates/marine-test-macro", version = "=0.7.0" } -marine-build-rs-generator = { path = "crates/marine-build-rs-generator", version = "=0.7.0" } +marine-test-macro = { path = "crates/marine-test-macro", version = "=0.7.1" } +marine-build-rs-generator = { path = "crates/marine-build-rs-generator", version = "=0.7.1" } fluence-app-service = { version = "0.18.1", features = ["raw-module-api"] } serde = { version = "1.0.118", features = ["derive"] } diff --git a/crates/marine-build-rs-generator/Cargo.toml b/crates/marine-build-rs-generator/Cargo.toml index 45c0626..44dff0c 100644 --- a/crates/marine-build-rs-generator/Cargo.toml +++ b/crates/marine-build-rs-generator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marine-build-rs-generator" -version = "0.7.0" # remember to update html_root_url +version = "0.7.1" # remember to update html_root_url edition = "2018" description = "Tools for generating marine_test_env in build scripts" documentation = "https://docs.rs/marine-build-rs-generator" @@ -17,5 +17,4 @@ all-features = true doctest = false [dependencies] -marine-test-macro-impl = { path = "../marine-test-macro-impl", version = "=0.7.0" } - +marine-test-macro-impl = { path = "../marine-test-macro-impl", version = "=0.7.1" } diff --git a/crates/marine-build-rs-generator/src/lib.rs b/crates/marine-build-rs-generator/src/lib.rs index 57c7781..45684e0 100644 --- a/crates/marine-build-rs-generator/src/lib.rs +++ b/crates/marine-build-rs-generator/src/lib.rs @@ -14,7 +14,7 @@ * limitations under the License. */ -#![doc(html_root_url = "https://docs.rs/marine-build-rs-generator/0.7.0")] +#![doc(html_root_url = "https://docs.rs/marine-build-rs-generator/0.7.1")] #![deny( dead_code, nonstandard_style, diff --git a/crates/marine-test-macro-impl/Cargo.toml b/crates/marine-test-macro-impl/Cargo.toml index 6fcda7e..c9cec13 100644 --- a/crates/marine-test-macro-impl/Cargo.toml +++ b/crates/marine-test-macro-impl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marine-test-macro-impl" -version = "0.7.0" # remember to update html_root_url +version = "0.7.1" # remember to update html_root_url edition = "2018" description = "Implementation of the `#[marine_test]` macro" documentation = "https://docs.rs/fluence/marine-test-macro-impl" diff --git a/crates/marine-test-macro-impl/src/marine_test/utils.rs b/crates/marine-test-macro-impl/src/marine_test/utils.rs index 30eadfb..f17fdba 100644 --- a/crates/marine-test-macro-impl/src/marine_test/utils.rs +++ b/crates/marine-test-macro-impl/src/marine_test/utils.rs @@ -31,7 +31,7 @@ pub(super) fn itype_to_tokens(itype: &IType, records: &IRecordTypes) -> TResult< IType::Record(record_id) => { let record = records .get(record_id) - .ok_or_else(|| crate::errors::CorruptedITSection::AbsentRecord(*record_id))?; + .ok_or(crate::errors::CorruptedITSection::AbsentRecord(*record_id))?; let record_name = new_ident(&record.name)?; let token_stream = quote! { #record_name }; token_stream diff --git a/crates/marine-test-macro/Cargo.toml b/crates/marine-test-macro/Cargo.toml index 6fdf0fc..9289f3d 100644 --- a/crates/marine-test-macro/Cargo.toml +++ b/crates/marine-test-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "marine-test-macro" -version = "0.7.0" # remember to update html_root_url +version = "0.7.1" # remember to update html_root_url edition = "2018" description = "Definition of the `#[marine_test]` macro" documentation = "https://docs.rs/fluence/marine-test-macro" @@ -18,7 +18,7 @@ proc-macro = true doctest = false [dependencies] -marine-test-macro-impl = { path = "../marine-test-macro-impl", version = "=0.7.0" } +marine-test-macro-impl = { path = "../marine-test-macro-impl", version = "=0.7.1" } quote = "1.0.9" proc-macro2 = "1.0.24" diff --git a/crates/marine-test-macro/src/lib.rs b/crates/marine-test-macro/src/lib.rs index 14ca41a..38ebd28 100644 --- a/crates/marine-test-macro/src/lib.rs +++ b/crates/marine-test-macro/src/lib.rs @@ -14,7 +14,7 @@ * limitations under the License. */ -#![doc(html_root_url = "https://docs.rs/marine-test-macro/0.7.0")] +#![doc(html_root_url = "https://docs.rs/marine-test-macro/0.7.1")] #![deny( dead_code, nonstandard_style, diff --git a/src/lib.rs b/src/lib.rs index bff4c2f..8471535 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,7 +14,7 @@ * limitations under the License. */ -#![doc(html_root_url = "https://docs.rs/marine-rs-sdk-test/0.7.0")] +#![doc(html_root_url = "https://docs.rs/marine-rs-sdk-test/0.7.1")] #![deny( dead_code, nonstandard_style,