make it work with latest solang (#776)

* make it work with latest solang

* rustfmt

* rm uneeded import
This commit is contained in:
Eugene 2022-01-08 22:16:54 +02:00 committed by GitHub
parent 8e0eddbb57
commit ba99bc1bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 62 additions and 62 deletions

118
Cargo.lock generated
View File

@ -54,9 +54,9 @@ dependencies = [
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.51" version = "1.0.52"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b26702f315f53b6071259e15dd9d64528213b44d61de1ec926eca7715d62203" checksum = "84450d0b4a8bd1ba4144ce8ce718fbc5d071358b1e5384bace6536b3d1f2d5b3"
[[package]] [[package]]
name = "arrayref" name = "arrayref"
@ -166,9 +166,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]] [[package]]
name = "base64ct" name = "base64ct"
version = "1.3.0" version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a46022bae2c3bc5a17c2d45d59c1233ce0e2cca9ae9b92e92e9ce529874177" checksum = "874f8444adcb4952a8bc51305c8be95c8ec8237bb0d2e78d2e039f771f8828a0"
[[package]] [[package]]
name = "bech32" name = "bech32"
@ -326,9 +326,9 @@ dependencies = [
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.8.0" version = "3.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
[[package]] [[package]]
name = "byte-slice-cast" name = "byte-slice-cast"
@ -485,7 +485,7 @@ dependencies = [
"k256", "k256",
"lazy_static", "lazy_static",
"serde", "serde",
"sha2 0.9.8", "sha2 0.9.9",
"thiserror", "thiserror",
] ]
@ -502,7 +502,7 @@ dependencies = [
"hmac", "hmac",
"pbkdf2 0.8.0", "pbkdf2 0.8.0",
"rand 0.8.4", "rand 0.8.4",
"sha2 0.9.8", "sha2 0.9.9",
"thiserror", "thiserror",
] ]
@ -522,7 +522,7 @@ dependencies = [
"ripemd160", "ripemd160",
"serde", "serde",
"serde_derive", "serde_derive",
"sha2 0.9.8", "sha2 0.9.9",
"sha3", "sha3",
"thiserror", "thiserror",
] ]
@ -847,9 +847,9 @@ dependencies = [
[[package]] [[package]]
name = "dbl" name = "dbl"
version = "0.3.1" version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37e797687b5f09528a48fcb63b6914d0255b8a6c760699a919af37042f09d9b3" checksum = "bd2735a791158376708f9347fe8faba9667589d82427ef3aed6794a8981de3d9"
dependencies = [ dependencies = [
"generic-array 0.14.5", "generic-array 0.14.5",
] ]
@ -968,7 +968,7 @@ dependencies = [
"ed25519", "ed25519",
"rand 0.7.3", "rand 0.7.3",
"serde", "serde",
"sha2 0.9.8", "sha2 0.9.9",
"zeroize", "zeroize",
] ]
@ -1035,7 +1035,7 @@ dependencies = [
"scrypt", "scrypt",
"serde", "serde",
"serde_json", "serde_json",
"sha2 0.9.8", "sha2 0.9.9",
"sha3", "sha3",
"thiserror", "thiserror",
"uuid", "uuid",
@ -1314,7 +1314,7 @@ dependencies = [
"rusoto_kms", "rusoto_kms",
"semver", "semver",
"serde_json", "serde_json",
"sha2 0.9.8", "sha2 0.9.9",
"spki", "spki",
"tempfile", "tempfile",
"thiserror", "thiserror",
@ -1349,7 +1349,7 @@ dependencies = [
"semver", "semver",
"serde", "serde",
"serde_json", "serde_json",
"sha2 0.9.8", "sha2 0.9.9",
"solang-parser", "solang-parser",
"svm-rs", "svm-rs",
"tempdir", "tempdir",
@ -1462,9 +1462,9 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
[[package]] [[package]]
name = "futures" name = "futures"
version = "0.3.17" version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
@ -1617,9 +1617,9 @@ dependencies = [
[[package]] [[package]]
name = "h2" name = "h2"
version = "0.3.9" version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd" checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689"
dependencies = [ dependencies = [
"bytes", "bytes",
"fnv", "fnv",
@ -1709,13 +1709,13 @@ dependencies = [
[[package]] [[package]]
name = "http" name = "http"
version = "0.2.5" version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03"
dependencies = [ dependencies = [
"bytes", "bytes",
"fnv", "fnv",
"itoa 0.4.8", "itoa 1.0.1",
] ]
[[package]] [[package]]
@ -1842,9 +1842,9 @@ dependencies = [
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "1.7.0" version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"hashbrown", "hashbrown",
@ -1920,7 +1920,7 @@ dependencies = [
"ecdsa", "ecdsa",
"elliptic-curve", "elliptic-curve",
"sec1", "sec1",
"sha2 0.9.8", "sha2 0.9.9",
"sha3", "sha3",
] ]
@ -2258,7 +2258,7 @@ dependencies = [
"ecdsa", "ecdsa",
"elliptic-curve", "elliptic-curve",
"sec1", "sec1",
"sha2 0.9.8", "sha2 0.9.9",
] ]
[[package]] [[package]]
@ -2344,7 +2344,7 @@ dependencies = [
"crypto-mac 0.11.1", "crypto-mac 0.11.1",
"hmac", "hmac",
"password-hash", "password-hash",
"sha2 0.9.8", "sha2 0.9.9",
] ]
[[package]] [[package]]
@ -2443,18 +2443,18 @@ checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468"
[[package]] [[package]]
name = "pin-project" name = "pin-project"
version = "1.0.8" version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e"
dependencies = [ dependencies = [
"pin-project-internal", "pin-project-internal",
] ]
[[package]] [[package]]
name = "pin-project-internal" name = "pin-project-internal"
version = "1.0.8" version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2463,9 +2463,9 @@ dependencies = [
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.7" version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
[[package]] [[package]]
name = "pin-utils" name = "pin-utils"
@ -2520,9 +2520,9 @@ dependencies = [
[[package]] [[package]]
name = "ppv-lite86" name = "ppv-lite86"
version = "0.2.15" version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
[[package]] [[package]]
name = "precomputed-hash" name = "precomputed-hash"
@ -3012,7 +3012,7 @@ dependencies = [
"rusoto_credential", "rusoto_credential",
"rustc_version", "rustc_version",
"serde", "serde",
"sha2 0.9.8", "sha2 0.9.9",
"tokio", "tokio",
] ]
@ -3115,7 +3115,7 @@ dependencies = [
"password-hash", "password-hash",
"pbkdf2 0.8.0", "pbkdf2 0.8.0",
"salsa20", "salsa20",
"sha2 0.9.8", "sha2 0.9.9",
] ]
[[package]] [[package]]
@ -3181,9 +3181,9 @@ checksum = "930c0acf610d3fdb5e2ab6213019aaa04e227ebe9547b0649ba599b16d788bd7"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.131" version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1" checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@ -3210,9 +3210,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.131" version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b710a83c4e0dff6a3d511946b95274ad9ca9e5d3ae497b63fda866ac955358d2" checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -3221,9 +3221,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.73" version = "1.0.74"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcbd0344bc6533bc7ec56df11d42fb70f1b912351c0825ccb7211b59d8af7cf5" checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142"
dependencies = [ dependencies = [
"itoa 1.0.1", "itoa 1.0.1",
"ryu", "ryu",
@ -3291,9 +3291,9 @@ dependencies = [
[[package]] [[package]]
name = "sha2" name = "sha2"
version = "0.9.8" version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
dependencies = [ dependencies = [
"block-buffer 0.9.0", "block-buffer 0.9.0",
"cfg-if 1.0.0", "cfg-if 1.0.0",
@ -3350,9 +3350,9 @@ dependencies = [
[[package]] [[package]]
name = "signature" name = "signature"
version = "1.3.2" version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2807892cfa58e081aa1f1111391c7a0649d4fa127a4ffbe34bcbfb35a1171a4" checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788"
dependencies = [ dependencies = [
"digest 0.9.0", "digest 0.9.0",
"rand_core 0.6.3", "rand_core 0.6.3",
@ -3401,8 +3401,8 @@ dependencies = [
[[package]] [[package]]
name = "solang-parser" name = "solang-parser"
version = "0.1.0" version = "0.1.1"
source = "git+https://github.com/hyperledger-labs/solang#d92c43a7257009022016d6611255a5ce572852df" source = "git+https://github.com/hyperledger-labs/solang#190f7205dd2ec50f8d930741785a79e6ddf0148b"
dependencies = [ dependencies = [
"lalrpop", "lalrpop",
"lalrpop-util", "lalrpop-util",
@ -3497,7 +3497,7 @@ dependencies = [
"semver", "semver",
"serde", "serde",
"serde_json", "serde_json",
"sha2 0.9.8", "sha2 0.9.9",
"structopt", "structopt",
"tempfile", "tempfile",
"thiserror", "thiserror",
@ -3703,9 +3703,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.23.1" version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4baa378e417d780beff82bf54ceb0d195193ea6a00c14e22359e7f39456b5689" checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b"
dependencies = [ dependencies = [
"rustls", "rustls",
"tokio", "tokio",
@ -3871,9 +3871,9 @@ dependencies = [
[[package]] [[package]]
name = "typenum" name = "typenum"
version = "1.14.0" version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
[[package]] [[package]]
name = "uint" name = "uint"
@ -3962,9 +3962,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.3" version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]] [[package]]
name = "void" name = "void"
@ -4134,9 +4134,9 @@ dependencies = [
[[package]] [[package]]
name = "webpki-roots" name = "webpki-roots"
version = "0.22.1" version = "0.22.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c475786c6f47219345717a043a37ec04cb4bc185e28853adcc4fa0a947eba630" checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449"
dependencies = [ dependencies = [
"webpki", "webpki",
] ]
@ -4248,7 +4248,7 @@ dependencies = [
"rusb", "rusb",
"serde", "serde",
"serde_json", "serde_json",
"sha2 0.9.8", "sha2 0.9.9",
"signature", "signature",
"subtle", "subtle",
"thiserror", "thiserror",

View File

@ -451,9 +451,9 @@ fn parse_data(content: &str) -> SolData {
} }
SourceUnitPart::ImportDirective(_, import) => { SourceUnitPart::ImportDirective(_, import) => {
let import = match import { let import = match import {
Import::Plain(s) => s, Import::Plain(s, _) => s,
Import::GlobalSymbol(s, _) => s, Import::GlobalSymbol(s, _, _) => s,
Import::Rename(s, _) => s, Import::Rename(s, _, _) => s,
}; };
imports.push(PathBuf::from(import.string)); imports.push(PathBuf::from(import.string));
} }