chore(build): fix clippy warnings (#213)

This commit is contained in:
Valery Antopol 2022-09-19 19:13:38 +03:00 committed by GitHub
parent 068dab124c
commit fd47800cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 207 additions and 411 deletions

570
Cargo.lock generated
View File

@ -302,12 +302,6 @@ dependencies = [
"bitflags",
]
[[package]]
name = "cmd_lib"
version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "475bd7aa7680b4ed8f6bb59745e882bcbaeb39326532bb79ffb1716480d9a274"
[[package]]
name = "console_error_panic_hook"
version = "0.1.7"
@ -541,26 +535,6 @@ dependencies = [
"darling_macro 0.10.2",
]
[[package]]
name = "darling"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c"
dependencies = [
"darling_core 0.12.4",
"darling_macro 0.12.4",
]
[[package]]
name = "darling"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
dependencies = [
"darling_core 0.13.4",
"darling_macro 0.13.4",
]
[[package]]
name = "darling"
version = "0.14.1"
@ -585,34 +559,6 @@ dependencies = [
"syn",
]
[[package]]
name = "darling_core"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim 0.10.0",
"syn",
]
[[package]]
name = "darling_core"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim 0.10.0",
"syn",
]
[[package]]
name = "darling_core"
version = "0.14.1"
@ -638,28 +584,6 @@ dependencies = [
"syn",
]
[[package]]
name = "darling_macro"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a"
dependencies = [
"darling_core 0.12.4",
"quote",
"syn",
]
[[package]]
name = "darling_macro"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
dependencies = [
"darling_core 0.13.4",
"quote",
"syn",
]
[[package]]
name = "darling_macro"
version = "0.14.1"
@ -913,14 +837,12 @@ dependencies = [
[[package]]
name = "fluence-app-service"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1519a1ece5d14a54046ed5e88155bfea47d209f73a05b32a18cf82e2d8ac5c43"
version = "0.22.1"
dependencies = [
"log",
"maplit",
"marine-min-it-version 0.1.0",
"marine-runtime 0.18.1",
"marine-min-it-version 0.2.0",
"marine-runtime 0.23.0",
"serde",
"serde_derive",
"serde_json",
@ -931,11 +853,13 @@ dependencies = [
[[package]]
name = "fluence-app-service"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a4c8f3b177149f19682f5c1498e61bdb914f79529d3301d971027cd2470617c"
dependencies = [
"log",
"maplit",
"marine-min-it-version 0.2.0",
"marine-runtime 0.23.0",
"marine-min-it-version 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-runtime 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde",
"serde_derive",
"serde_json",
@ -1341,20 +1265,6 @@ version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
[[package]]
name = "it-json-serde"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e3b7efb8eeb6892a947928c10ac963e5d5101c173924453466314bf004306b4"
dependencies = [
"serde",
"serde_derive",
"serde_json",
"serde_with 1.14.0",
"thiserror",
"wasmer-interface-types-fl 0.23.1",
]
[[package]]
name = "it-json-serde"
version = "0.3.4"
@ -1363,7 +1273,20 @@ dependencies = [
"serde_derive",
"serde_json",
"thiserror",
"wasmer-interface-types-fl 0.24.1",
"wasmer-interface-types-fl",
]
[[package]]
name = "it-json-serde"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d7bc35c4e8bc44e236bc459a88a24a74326eedff6b073a435eb5537849bfd25"
dependencies = [
"serde",
"serde_derive",
"serde_json",
"thiserror",
"wasmer-interface-types-fl",
]
[[package]]
@ -1394,15 +1317,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "729c74bb4236418898a219c6d96f14cba77456dd7c04a2e99e65e9c643709b56"
[[package]]
name = "itertools"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.10.3"
@ -1525,51 +1439,18 @@ dependencies = [
"termion",
"thiserror",
"toml",
"walrus 0.19.0",
"walrus",
]
[[package]]
name = "marine-build-rs-generator"
version = "0.7.1"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78114a6ef0fbde6310d8d1f9e9968a0e04bbbc6526f12316c77db8f5e7855a8"
checksum = "38e5fabc40871ff0c5ccea18ea0e36de848b0e97b582df4eb34d5de565f88aa2"
dependencies = [
"marine-test-macro-impl",
]
[[package]]
name = "marine-core"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c18b924984c79fb11a0f989e293c9ba5ba8b1061bc99f2bd45e63d139c2a01b0"
dependencies = [
"anyhow",
"boolinator",
"bytesize",
"it-lilo",
"it-memory-traits",
"log",
"marine-it-generator 0.9.1",
"marine-it-interfaces 0.7.1",
"marine-it-parser 0.9.1",
"marine-min-it-version 0.1.0",
"marine-module-info-parser 0.3.0",
"marine-module-interface 0.4.1",
"marine-utils 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"multimap",
"once_cell",
"parity-wasm 0.42.2",
"paste",
"pwasm-utils 0.18.2",
"semver 0.11.0",
"serde",
"thiserror",
"wasmer-interface-types-fl 0.23.1",
"wasmer-runtime-core-fl",
"wasmer-runtime-fl",
"wasmer-wasi-fl",
]
[[package]]
name = "marine-core"
version = "0.18.0"
@ -1592,33 +1473,49 @@ dependencies = [
"once_cell",
"parity-wasm 0.45.0",
"paste",
"pwasm-utils 0.19.0",
"pwasm-utils",
"reqwest",
"semver 1.0.13",
"serde",
"thiserror",
"tokio",
"wasmer-interface-types-fl 0.24.1",
"wasmer-interface-types-fl",
"wasmer-runtime-core-fl",
"wasmer-runtime-fl",
"wasmer-wasi-fl",
]
[[package]]
name = "marine-it-generator"
version = "0.9.1"
name = "marine-core"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f68db04cab6cd0afa567251d80b4ef8223b317beffb99323c117bcc4a9773a4"
checksum = "b68e6db433b04a70ebfa7d4f65797863d45d3af0bbbb2865e39ab3de92803c2a"
dependencies = [
"anyhow",
"boolinator",
"bytesize",
"it-lilo",
"marine-it-parser 0.9.1",
"marine-macro-impl",
"it-memory-traits",
"log",
"marine-it-generator 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-it-interfaces 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-it-parser 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-min-it-version 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-module-info-parser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-module-interface 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-utils 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"multimap",
"once_cell",
"parity-wasm 0.45.0",
"paste",
"pwasm-utils",
"semver 1.0.13",
"serde",
"serde_json",
"thiserror",
"walrus 0.18.0",
"wasmer-interface-types-fl 0.23.1",
"wasmer-interface-types-fl",
"wasmer-runtime-core-fl",
"wasmer-runtime-fl",
"wasmer-wasi-fl",
]
[[package]]
@ -1632,18 +1529,25 @@ dependencies = [
"serde",
"serde_json",
"thiserror",
"walrus 0.19.0",
"wasmer-interface-types-fl 0.24.1",
"walrus",
"wasmer-interface-types-fl",
]
[[package]]
name = "marine-it-interfaces"
version = "0.7.1"
name = "marine-it-generator"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3236d1068eaa0f1a07ab74b098b777c150c0c354a16d8869cd69ae3ff847014"
checksum = "6f2cbca852ae9b00f95e48afcf9135ea3cc54b7364dff7adaf5dc57e4dab6668"
dependencies = [
"multimap",
"wasmer-interface-types-fl 0.23.1",
"it-lilo",
"marine-it-parser 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-macro-impl",
"once_cell",
"serde",
"serde_json",
"thiserror",
"walrus",
"wasmer-interface-types-fl",
]
[[package]]
@ -1651,26 +1555,17 @@ name = "marine-it-interfaces"
version = "0.7.3"
dependencies = [
"multimap",
"wasmer-interface-types-fl 0.24.1",
"wasmer-interface-types-fl",
]
[[package]]
name = "marine-it-parser"
version = "0.9.1"
name = "marine-it-interfaces"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edea8966aa56f373e3b2db95432b023e20137c7d58798f74a67ee5749370d289"
checksum = "e57037e5bf10449d7603ea7ff1012aae3a6f77e266e4a1cc1decabeb5e0f9924"
dependencies = [
"anyhow",
"itertools 0.10.3",
"marine-it-interfaces 0.7.1",
"marine-module-interface 0.4.1",
"nom",
"semver 0.11.0",
"serde",
"thiserror",
"walrus 0.18.0",
"wasmer-interface-types-fl 0.23.1",
"wasmer-runtime-core-fl",
"multimap",
"wasmer-interface-types-fl",
]
[[package]]
@ -1678,15 +1573,34 @@ name = "marine-it-parser"
version = "0.11.0"
dependencies = [
"anyhow",
"itertools 0.10.3",
"itertools",
"marine-it-interfaces 0.7.3",
"marine-module-interface 0.6.0",
"nom",
"semver 1.0.13",
"serde",
"thiserror",
"walrus 0.19.0",
"wasmer-interface-types-fl 0.24.1",
"walrus",
"wasmer-interface-types-fl",
"wasmer-runtime-core-fl",
]
[[package]]
name = "marine-it-parser"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e52c1e59b84546be07004851c242a5644487211b62c242c69ceff57f9112aa0"
dependencies = [
"anyhow",
"itertools",
"marine-it-interfaces 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-module-interface 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"nom",
"semver 1.0.13",
"serde",
"thiserror",
"walrus",
"wasmer-interface-types-fl",
"wasmer-runtime-core-fl",
]
@ -1702,7 +1616,7 @@ dependencies = [
"it-json-serde 0.3.4",
"it-lilo",
"it-memory-traits",
"itertools 0.10.3",
"itertools",
"log",
"maplit",
"marine-it-interfaces 0.7.3",
@ -1721,7 +1635,7 @@ dependencies = [
"thiserror",
"toml",
"wasm-bindgen",
"wasmer-interface-types-fl 0.24.1",
"wasmer-interface-types-fl",
"web-sys",
]
@ -1748,16 +1662,6 @@ dependencies = [
"syn",
]
[[package]]
name = "marine-min-it-version"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "890269754a531810b8c16cf00e6161e01c1183ef7ff4ff20117656316e9fdbd1"
dependencies = [
"once_cell",
"semver 0.11.0",
]
[[package]]
name = "marine-min-it-version"
version = "0.2.0"
@ -1767,19 +1671,13 @@ dependencies = [
]
[[package]]
name = "marine-module-info-parser"
version = "0.3.0"
name = "marine-min-it-version"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d85c5353236fdb9a94dc09531d3cef40866df88c27903a432ef32263d5111e4"
checksum = "af8d201133f1ca6af9d9bc68a2fe03e16e7c5672456e1aa2c7785976f544265d"
dependencies = [
"anyhow",
"chrono",
"marine-rs-sdk-main",
"semver 0.11.0",
"serde",
"thiserror",
"walrus 0.18.0",
"wasmer-runtime-core-fl",
"once_cell",
"semver 1.0.13",
]
[[package]]
@ -1792,25 +1690,24 @@ dependencies = [
"semver 1.0.13",
"serde",
"thiserror",
"walrus 0.19.0",
"walrus",
"wasmer-runtime-core-fl",
]
[[package]]
name = "marine-module-interface"
version = "0.4.1"
name = "marine-module-info-parser"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb284ad998636d64bfad9fef2849d8a02127ce9c094b4a3e53b2eb62c14e5e5f"
checksum = "923184474998c2deadf603f95cd1d3a215f98428c90c0daff4ba98aa2de888f8"
dependencies = [
"anyhow",
"itertools 0.10.3",
"marine-it-interfaces 0.7.1",
"nom",
"semver 0.11.0",
"chrono",
"marine-rs-sdk-main",
"semver 1.0.13",
"serde",
"thiserror",
"walrus 0.18.0",
"wasmer-interface-types-fl 0.23.1",
"walrus",
"wasmer-runtime-core-fl",
]
[[package]]
@ -1818,14 +1715,31 @@ name = "marine-module-interface"
version = "0.6.0"
dependencies = [
"anyhow",
"itertools 0.10.3",
"itertools",
"marine-it-interfaces 0.7.3",
"nom",
"semver 1.0.13",
"serde",
"thiserror",
"walrus 0.19.0",
"wasmer-interface-types-fl 0.24.1",
"walrus",
"wasmer-interface-types-fl",
]
[[package]]
name = "marine-module-interface"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37ee2b9e4ac777a57359380fca1b1b5f71ff7ffa83a3b2a4aefd56fae4854296"
dependencies = [
"anyhow",
"itertools",
"marine-it-interfaces 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"nom",
"semver 1.0.13",
"serde",
"thiserror",
"walrus",
"wasmer-interface-types-fl",
]
[[package]]
@ -1853,45 +1767,16 @@ dependencies = [
[[package]]
name = "marine-rs-sdk-test"
version = "0.7.1"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7db2c33b0169aa1fddf88ef51f245a59cd0b288b3710b48172afd139fdecabe"
checksum = "f83cec3d030da1e06b72d241f76e7ff0b701aafe942ddf4ea8a9e053352d9935"
dependencies = [
"fluence-app-service 0.18.1",
"fluence-app-service 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-build-rs-generator",
"marine-test-macro",
"serde",
"serde_json",
"uuid 0.8.2",
]
[[package]]
name = "marine-runtime"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7ed0ecac893ecc26c925cbe00c6a1eb8ac9f8d9e60ebc9c0bd390fba08617f2"
dependencies = [
"bytesize",
"cmd_lib",
"it-json-serde 0.3.1",
"itertools 0.9.0",
"log",
"marine-core 0.16.1",
"marine-module-interface 0.4.1",
"marine-rs-sdk",
"marine-rs-sdk-main",
"marine-utils 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-transmute",
"serde",
"serde_derive",
"serde_json",
"serde_with 1.14.0",
"thiserror",
"toml",
"wasmer-interface-types-fl 0.23.1",
"wasmer-runtime-core-fl",
"wasmer-runtime-fl",
"wasmer-wasi-fl",
"uuid",
]
[[package]]
@ -1901,7 +1786,7 @@ dependencies = [
"bytesize",
"env_logger 0.9.0",
"it-json-serde 0.3.4",
"itertools 0.10.3",
"itertools",
"log",
"marine-core 0.18.0",
"marine-module-interface 0.6.0",
@ -1914,10 +1799,38 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
"serde_with 2.0.0",
"serde_with",
"thiserror",
"toml",
"wasmer-interface-types-fl 0.24.1",
"wasmer-interface-types-fl",
"wasmer-runtime-core-fl",
"wasmer-runtime-fl",
"wasmer-wasi-fl",
]
[[package]]
name = "marine-runtime"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec3d1b0f4d5f946a1eba7d2f295a2f61836116aa30dd0be60d73b950d93b799e"
dependencies = [
"bytesize",
"it-json-serde 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools",
"log",
"marine-core 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-module-interface 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"marine-rs-sdk",
"marine-rs-sdk-main",
"marine-utils 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-transmute",
"serde",
"serde_derive",
"serde_json",
"serde_with",
"thiserror",
"toml",
"wasmer-interface-types-fl",
"wasmer-runtime-core-fl",
"wasmer-runtime-fl",
"wasmer-wasi-fl",
@ -1934,9 +1847,9 @@ dependencies = [
[[package]]
name = "marine-test-macro"
version = "0.7.1"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4aa43ebbd26b6fbe1f390cd697c1fac0d6ce99a0e50c1d669e90f10cf9c4abf5"
checksum = "61f9eeff88f59b3eb22a0c8e5adfad132a002d6e004d95b23cc77674f15782c3"
dependencies = [
"marine-test-macro-impl",
"proc-macro-error",
@ -1947,14 +1860,14 @@ dependencies = [
[[package]]
name = "marine-test-macro-impl"
version = "0.7.1"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9ba843cfbe262b47b587096caa845860b679ecb4a5c4746011abc5abf9c1ce9"
checksum = "50aa0bc3097682e7a8c90bd19b7d7dac13392b910865008fe27848de62ade756"
dependencies = [
"darling 0.12.4",
"fluence-app-service 0.18.1",
"itertools 0.10.3",
"marine-it-parser 0.9.1",
"darling 0.14.1",
"fluence-app-service 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools",
"marine-it-parser 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro-error",
"proc-macro2",
"quote",
@ -2050,7 +1963,7 @@ dependencies = [
"clap",
"env_logger 0.9.0",
"fluence-app-service 0.22.1",
"itertools 0.10.3",
"itertools",
"log",
"marine-rs-sdk-main",
"rustop",
@ -2059,7 +1972,7 @@ dependencies = [
"serde",
"serde_json",
"termion",
"uuid 1.1.2",
"uuid",
"wasmer-wasi-fl",
]
@ -2325,16 +2238,6 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
[[package]]
name = "pest"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b0560d531d1febc25a3c9398a62a71256c0178f2e3443baedd9ad4bb8c9deb4"
dependencies = [
"thiserror",
"ucd-trie",
]
[[package]]
name = "pin-project-lite"
version = "0.2.9"
@ -2421,17 +2324,6 @@ dependencies = [
"marine-rs-sdk",
]
[[package]]
name = "pwasm-utils"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c"
dependencies = [
"byteorder",
"log",
"parity-wasm 0.42.2",
]
[[package]]
name = "pwasm-utils"
version = "0.19.0"
@ -2752,16 +2644,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
dependencies = [
"semver-parser 0.7.0",
]
[[package]]
name = "semver"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
dependencies = [
"semver-parser 0.10.2",
"semver-parser",
]
[[package]]
@ -2779,15 +2662,6 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]]
name = "semver-parser"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
dependencies = [
"pest",
]
[[package]]
name = "serde"
version = "1.0.144"
@ -2850,16 +2724,6 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_with"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff"
dependencies = [
"serde",
"serde_with_macros 1.5.2",
]
[[package]]
name = "serde_with"
version = "2.0.0"
@ -2872,22 +2736,10 @@ dependencies = [
"indexmap",
"serde",
"serde_json",
"serde_with_macros 2.0.0",
"serde_with_macros",
"time 0.3.14",
]
[[package]]
name = "serde_with_macros"
version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
dependencies = [
"darling 0.13.4",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_with_macros"
version = "2.0.0"
@ -3420,12 +3272,6 @@ dependencies = [
"syn",
]
[[package]]
name = "ucd-trie"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
[[package]]
name = "unicode-bidi"
version = "0.3.8"
@ -3482,15 +3328,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372"
[[package]]
name = "uuid"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
dependencies = [
"getrandom 0.2.7",
]
[[package]]
name = "uuid"
version = "1.1.2"
@ -3555,20 +3392,6 @@ dependencies = [
"quote",
]
[[package]]
name = "walrus"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d470d0583e65f4cab21a1ff3c1ba3dd23ae49e68f516f0afceaeb001b32af39"
dependencies = [
"anyhow",
"id-arena",
"leb128",
"log",
"walrus-macro 0.18.0",
"wasmparser 0.59.0",
]
[[package]]
name = "walrus"
version = "0.19.0"
@ -3579,22 +3402,10 @@ dependencies = [
"id-arena",
"leb128",
"log",
"walrus-macro 0.19.0",
"walrus-macro",
"wasmparser 0.77.0",
]
[[package]]
name = "walrus-macro"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7c2bb690b44cb1b0fdcc54d4998d21f8bdaf706b93775425e440b174f39ad16"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "walrus-macro"
version = "0.19.0"
@ -3811,27 +3622,6 @@ dependencies = [
"wasmparser 0.51.4",
]
[[package]]
name = "wasmer-interface-types-fl"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb2da50f3cdfee8539f69c34427cef5d66dba0c0c2596db9dbefb5aceaa7f798"
dependencies = [
"fluence-it-types",
"it-lilo",
"it-memory-traits",
"it-to-bytes",
"itertools 0.10.3",
"log",
"nom",
"safe-transmute",
"semver 0.11.0",
"serde",
"serde_json",
"thiserror",
"wast",
]
[[package]]
name = "wasmer-interface-types-fl"
version = "0.24.1"
@ -3842,7 +3632,7 @@ dependencies = [
"it-lilo",
"it-memory-traits",
"it-to-bytes",
"itertools 0.10.3",
"itertools",
"log",
"nom",
"safe-transmute",
@ -3963,12 +3753,6 @@ version = "0.51.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a"
[[package]]
name = "wasmparser"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a950e6a618f62147fd514ff445b2a0b53120d382751960797f85f058c7eda9b9"
[[package]]
name = "wasmparser"
version = "0.77.0"

View File

@ -30,6 +30,7 @@ use std::collections::HashSet;
const DEFAULT_HEAP_PAGES_COUNT: u32 = 1600;
pub type HostExportedFunc = Box<dyn Fn(&mut Ctx, Vec<IValue>) -> Option<IValue> + 'static>;
pub type ErrorHandler = Option<Box<dyn Fn(&HostImportError) -> Option<IValue> + 'static>>;
pub struct HostImportDescriptor {
/// This closure will be invoked for corresponding import.
@ -43,7 +44,7 @@ pub struct HostImportDescriptor {
/// If Some, this closure is called with error when errors is encountered while lifting.
/// If None, panic will occur.
pub error_handler: Option<Box<dyn Fn(&HostImportError) -> Option<IValue> + 'static>>,
pub error_handler: ErrorHandler,
}
pub struct MModuleConfig {

View File

@ -16,6 +16,8 @@
#![allow(improper_ctypes)]
#![allow(clippy::all)]
#![allow(unused_mut)]
#![allow(dead_code)]
use marine_rs_sdk::marine;
static mut DATA: Option<Vec<u8>> = None;

View File

@ -67,7 +67,7 @@ impl RecordsTransformer {
return Ok(());
}
for field in (&record.fields).iter() {
for field in record.fields.iter() {
self.type_dfs(&field.ty, exported_records)?;
}

View File

@ -15,7 +15,7 @@ path = "src/main.rs"
marine-rs-sdk = "0.7.0"
[dev-dependencies]
marine-rs-sdk-test = "0.7.0"
marine-rs-sdk-test = "0.8.1"
[build-dependencies]
marine-rs-sdk-test = "0.7.0"
marine-rs-sdk-test = "0.8.1"

View File

@ -13,4 +13,4 @@ path = "src/main.rs"
marine-rs-sdk ="0.7.0"
[dev-dependencies]
marine-rs-sdk-test = "0.7.0"
marine-rs-sdk-test = "0.8.1"

View File

@ -15,4 +15,4 @@ path = "src/main.rs"
marine-rs-sdk = "0.7.0"
[dev-dependencies]
marine-rs-sdk-test = "0.7.0"
marine-rs-sdk-test = "0.8.1"

View File

@ -15,4 +15,4 @@ path = "src/main.rs"
marine-rs-sdk = "0.7.0"
[dev-dependencies]
marine-rs-sdk-test = "0.7.0"
marine-rs-sdk-test = "0.8.1"

View File

@ -16,4 +16,4 @@ marine-rs-sdk = {version = "0.7.0", features = ["logger"]}
log = "0.4.8"
[dev-dependencies]
marine-rs-sdk-test = "0.7.0"
marine-rs-sdk-test = "0.8.1"

View File

@ -8,4 +8,4 @@ publish = false
[dependencies]
[dev-dependencies]
marine-rs-sdk-test = "0.7.0"
marine-rs-sdk-test = "0.8.1"

View File

@ -15,6 +15,8 @@
*/
mod errors;
// Code will be completely rewritten anyway.
#[allow(clippy::module_inception)]
mod faas;
mod faas_interface;

View File

@ -32,9 +32,9 @@ pub struct WithContext<'c, T> {
}
impl ConfigContext {
pub fn wrapped<'c, T>(&'c self, data: T) -> WithContext<'c, T> {
pub fn wrapped<T>(&self, data: T) -> WithContext<'_, T> {
WithContext {
context: &self,
context: self,
data,
}
}
@ -171,7 +171,7 @@ impl TryFrom<TomlMarineConfig> for MarineConfig {
type Error = MarineError;
fn try_from(toml_config: TomlMarineConfig) -> Result<Self, Self::Error> {
let base_path = PathBuf::from(toml_config.base_path);
let base_path = toml_config.base_path;
let context = ConfigContext {
base_path: Some(base_path),
};

View File

@ -64,7 +64,7 @@ fn print_record_types<'r>(
}
}
if printed_record_types.len() == 0 {
if printed_record_types.is_empty() {
writeln!(f, "<no exported data types>")?;
}
@ -79,7 +79,7 @@ fn print_functions_sign<'r>(
writeln!(f, "exported functions:")?;
for (name, module_interface) in modules {
writeln!(f, "{}:", *name)?;
if module_interface.function_signatures.len() == 0 {
if module_interface.function_signatures.is_empty() {
writeln!(f, "<no exported functions>")?;
continue;
}

View File

@ -27,7 +27,7 @@ pub(crate) fn load_modules_from_fs(
let loaded = modules
.iter()
.try_fold(HashMap::new(), |mut hash_map, (import_name, path)| {
let module_bytes = std::fs::read(&path).map_err(|e| {
let module_bytes = std::fs::read(path).map_err(|e| {
MarineError::IOError(format!("failed to load {}: {}", path.display(), e))
})?;

View File

@ -15,6 +15,8 @@
*/
#![allow(clippy::all)]
#![allow(unused_variables)]
#![allow(dead_code)]
use marine_rs_sdk::marine;
use core::cell::RefCell;

View File

@ -16,6 +16,9 @@
#![allow(improper_ctypes)]
#![allow(clippy::all)]
#![allow(unused_mut)]
#![allow(dead_code)]
#![allow(unused_variables)]
use marine_rs_sdk::marine;
use core::cell::RefCell;

View File

@ -24,7 +24,7 @@ pub enum ManifestError {
pub(crate) fn extract_sdk_version(path: &Path) -> Result<Version, ManifestError> {
let path = Path::new(&path);
let manifest = Manifest::from_path(&path).map_err(|e| -> ManifestError {
let manifest = Manifest::from_path(path).map_err(|e| -> ManifestError {
match e {
CargoTomlError::Parse(e) => e.into(),
CargoTomlError::Io(e) => e.into(),
@ -44,5 +44,5 @@ pub(crate) fn extract_sdk_version(path: &Path) -> Result<Version, ManifestError>
.ok_or(ManifestError::NoSdkVersionError)?,
};
Version::from_str(&version).map_err(Into::into)
Version::from_str(version).map_err(Into::into)
}

View File

@ -74,6 +74,8 @@ impl REPL {
/// Returns true, it should be the last executed command.
pub fn execute<'args>(&mut self, mut args: impl Iterator<Item = &'args str>) -> bool {
// Explicit statements on "h"/"help" options is more convenient, as we have such commands.
#[allow(clippy::wildcard_in_or_patterns)]
match args.next() {
Some("n") | Some("new") => self.new_service(args),
Some("l") | Some("load") => self.load_module(args),
@ -226,7 +228,7 @@ impl REPL {
let mut config = config_file_path
.as_ref()
.map(|p| TomlAppServiceConfig::load(p))
.map(TomlAppServiceConfig::load)
.transpose()?
.unwrap_or_default();
config.service_base_dir = Some(tmp_path);