Fix: use cwd manifest (#1869)

* fix(abigen): make compatible with older rust versions

* Update ethers-contract/ethers-contract-abigen/src/multi.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix: linting

* fix(abigen): use active cargo.toml over crate cargo.toml

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Will Smith 2022-11-17 14:23:10 -05:00 committed by GitHub
parent f5da30d23b
commit 9d75e5f178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -571,7 +571,7 @@ impl MultiBindingsInner {
/// parses the active Cargo.toml to get what version of ethers we are using /// parses the active Cargo.toml to get what version of ethers we are using
fn find_crate_version(&self) -> Result<String> { fn find_crate_version(&self) -> Result<String> {
let cargo_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("Cargo.toml"); let cargo_dir = std::env::current_dir()?.join("Cargo.toml");
let data = std::fs::read_to_string(cargo_dir)?; let data = std::fs::read_to_string(cargo_dir)?;
let toml = data.parse::<Value>()?; let toml = data.parse::<Value>()?;