From de275db56a1be948cf4a543e1837f5add6f4750c Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Thu, 3 Mar 2022 16:47:09 -0800 Subject: [PATCH] fix: bump solang and adjust breaking change fixes https://github.com/gakonst/ethers-rs/issues/985 --- Cargo.lock | 4 ++-- ethers-solc/src/resolver/mod.rs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e2865c97..88e5edae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3511,9 +3511,9 @@ dependencies = [ [[package]] name = "solang-parser" -version = "0.1.2" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec12f31165397a3b145b0b06bc47470226ac9bf52b9aa8ea1ab7aa6e74809b39" +checksum = "a06b8bfb6c910adbada563211b876b91a058791505e4cb646591b205fa817d01" dependencies = [ "lalrpop", "lalrpop-util", diff --git a/ethers-solc/src/resolver/mod.rs b/ethers-solc/src/resolver/mod.rs index 20b77c96..a2ba28a1 100644 --- a/ethers-solc/src/resolver/mod.rs +++ b/ethers-solc/src/resolver/mod.rs @@ -756,7 +756,10 @@ impl From> for Location { impl From for Location { fn from(src: Loc) -> Self { - Location { start: src.1, end: src.2 } + match src { + Loc::File(_, start, end) => Location { start, end }, + _ => Location { start: 0, end: 0 }, + } } }