From fb88215a8701f745339d661a6a70fa46853000e0 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Tue, 8 Nov 2022 00:43:23 +0100 Subject: [PATCH] fix: rustdoc errors (#1808) * fix: rustdoc warnings * fix: partially re-run abigen for multicall_contract * fix * fix test * fix: rustdoc nightly warnings --- .../src/contract/structs.rs | 2 +- .../ethers-contract-abigen/src/filter.rs | 2 +- .../ethers-contract-abigen/src/multi.rs | 2 ++ ethers-contract/src/contract.rs | 2 +- .../src/multicall/multicall_contract.rs | 17 ++++++++++++++--- ethers-core/src/abi/human_readable/mod.rs | 2 +- ethers-core/src/types/block.rs | 2 +- ethers-core/src/types/serde_helpers.rs | 2 +- ethers-core/src/types/transaction/eip712.rs | 2 +- ethers-etherscan/src/contract.rs | 4 ++-- ethers-solc/src/artifact_output/mod.rs | 6 +++--- src/lib.rs | 2 +- 12 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ethers-contract/ethers-contract-abigen/src/contract/structs.rs b/ethers-contract/ethers-contract-abigen/src/contract/structs.rs index 37dd624d..0f6ef3a1 100644 --- a/ethers-contract/ethers-contract-abigen/src/contract/structs.rs +++ b/ethers-contract/ethers-contract-abigen/src/contract/structs.rs @@ -225,7 +225,7 @@ pub struct InternalStructs { /// from ethabi. pub(crate) function_params: HashMap<(String, String), String>, - /// (function name) -> Vec all structs the function returns + /// (function name) -> `Vec` all structs the function returns pub(crate) outputs: HashMap>, /// (event name, idx) -> struct which are the identifying properties we get the name diff --git a/ethers-contract/ethers-contract-abigen/src/filter.rs b/ethers-contract/ethers-contract-abigen/src/filter.rs index c5023d7e..d071ac87 100644 --- a/ethers-contract/ethers-contract-abigen/src/filter.rs +++ b/ethers-contract/ethers-contract-abigen/src/filter.rs @@ -1,4 +1,4 @@ -//! Filtering support for contracts used in [`Abigen`] +//! Filtering support for contracts used in [`Abigen`][crate::Abigen] use regex::Regex; use std::collections::HashSet; diff --git a/ethers-contract/ethers-contract-abigen/src/multi.rs b/ethers-contract/ethers-contract-abigen/src/multi.rs index 1fba149e..b09a7019 100644 --- a/ethers-contract/ethers-contract-abigen/src/multi.rs +++ b/ethers-contract/ethers-contract-abigen/src/multi.rs @@ -99,6 +99,7 @@ impl MultiAbigen { /// let gen = MultiAbigen::from_json_files("./abi").unwrap().with_filter( /// SelectContracts::default().add_name("MyContract").add_name("MyOtherContract"), /// ); + /// # } /// ``` /// /// Exclude all contracts that end with test @@ -109,6 +110,7 @@ impl MultiAbigen { /// let gen = MultiAbigen::from_json_files("./abi").unwrap().with_filter( /// ExcludeContracts::default().add_pattern(".*Test"), /// ); + /// # } /// ``` #[must_use] pub fn with_filter(mut self, filter: impl Into) -> Self { diff --git a/ethers-contract/src/contract.rs b/ethers-contract/src/contract.rs index 11ec62a3..2a4e2c8c 100644 --- a/ethers-contract/src/contract.rs +++ b/ethers-contract/src/contract.rs @@ -147,7 +147,7 @@ use std::{fmt::Debug, marker::PhantomData, sync::Arc}; /// _Disclaimer: these above docs have been adapted from the corresponding [ethers.js page](https://docs.ethers.io/ethers.js/html/api-contract.html)_ /// /// [`abigen`]: macro.abigen.html -/// [`Abigen` builder]: crate::Abigen +/// [`Abigen` builder]: struct.Abigen.html /// [`event`]: method@crate::Contract::event /// [`method`]: method@crate::Contract::method #[derive(Debug)] diff --git a/ethers-contract/src/multicall/multicall_contract.rs b/ethers-contract/src/multicall/multicall_contract.rs index 7154f287..661ac998 100644 --- a/ethers-contract/src/multicall/multicall_contract.rs +++ b/ethers-contract/src/multicall/multicall_contract.rs @@ -4,15 +4,26 @@ pub mod multicall_3 { #![allow(dead_code)] #![allow(clippy::type_complexity)] #![allow(unused_imports)] - // Some macros like EthAbiType and EthAbiCodec expand into using "ethers_contract" which is not - // defined here + /// Some macros may expand into using `ethers_contract` instead of `crate`. mod ethers_contract { pub use crate::*; } + use self::ethers_contract::{ + builders::{ContractCall, Event}, + Contract, Lazy, + }; + use ethers_core::{ + abi::{Abi, Detokenize, InvalidOutputType, Token, Tokenizable}, + types::*, + }; + use ethers_providers::Middleware; #[doc = "Multicall3 was auto-generated with ethers-rs Abigen. More information at: https://github.com/gakonst/ethers-rs"] + use std::sync::Arc; + # [rustfmt :: skip] const __ABI : & str = "[{\"type\":\"function\",\"name\":\"aggregate\",\"inputs\":[{\"internalType\":\"struct Multicall3.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"address\"},{\"type\":\"bytes\"}]}],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"returnData\",\"type\":\"bytes[]\"}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"aggregate3\",\"inputs\":[{\"internalType\":\"struct Multicall3.Call3[]\",\"name\":\"calls\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"address\"},{\"type\":\"bool\"},{\"type\":\"bytes\"}]}],\"outputs\":[{\"internalType\":\"struct Multicall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"bool\"},{\"type\":\"bytes\"}]}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"aggregate3Value\",\"inputs\":[{\"internalType\":\"struct Multicall3.Call3Value[]\",\"name\":\"calls\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"address\"},{\"type\":\"bool\"},{\"type\":\"uint256\"},{\"type\":\"bytes\"}]}],\"outputs\":[{\"internalType\":\"struct Multicall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"bool\"},{\"type\":\"bytes\"}]}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"blockAndAggregate\",\"inputs\":[{\"internalType\":\"struct Multicall3.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"address\"},{\"type\":\"bytes\"}]}],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"struct Multicall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"bool\"},{\"type\":\"bytes\"}]}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"getBasefee\",\"inputs\":[],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"basefee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlockHash\",\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlockNumber\",\"inputs\":[],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getChainId\",\"inputs\":[],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainid\",\"type\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentBlockCoinbase\",\"inputs\":[],\"outputs\":[{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentBlockDifficulty\",\"inputs\":[],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"difficulty\",\"type\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentBlockGasLimit\",\"inputs\":[],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"gaslimit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getCurrentBlockTimestamp\",\"inputs\":[],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getEthBalance\",\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLastBlockHash\",\"inputs\":[],\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"tryAggregate\",\"inputs\":[{\"internalType\":\"bool\",\"name\":\"requireSuccess\",\"type\":\"bool\"},{\"internalType\":\"struct Multicall3.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"address\"},{\"type\":\"bytes\"}]}],\"outputs\":[{\"internalType\":\"struct Multicall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"bool\"},{\"type\":\"bytes\"}]}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"tryBlockAndAggregate\",\"inputs\":[{\"internalType\":\"bool\",\"name\":\"requireSuccess\",\"type\":\"bool\"},{\"internalType\":\"struct Multicall3.Call[]\",\"name\":\"calls\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"address\"},{\"type\":\"bytes\"}]}],\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"struct Multicall3.Result[]\",\"name\":\"returnData\",\"type\":\"tuple[]\",\"components\":[{\"type\":\"bool\"},{\"type\":\"bytes\"}]}],\"stateMutability\":\"payable\"}]" ; + #[doc = r" The parsed JSON-ABI of the contract."] pub static MULTICALL3_ABI: ethers_contract::Lazy = ethers_contract::Lazy::new(|| { - ethers_core :: utils :: __serde_json :: from_str ("[\n {\n \"inputs\": [\n {\n \"components\": [\n { \"internalType\": \"address\", \"name\": \"target\", \"type\": \"address\" },\n { \"internalType\": \"bytes\", \"name\": \"callData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Call[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"aggregate\",\n \"outputs\": [\n { \"internalType\": \"uint256\", \"name\": \"blockNumber\", \"type\": \"uint256\" },\n { \"internalType\": \"bytes[]\", \"name\": \"returnData\", \"type\": \"bytes[]\" }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n { \"internalType\": \"address\", \"name\": \"target\", \"type\": \"address\" },\n { \"internalType\": \"bool\", \"name\": \"allowFailure\", \"type\": \"bool\" },\n { \"internalType\": \"bytes\", \"name\": \"callData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Call3[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"aggregate3\",\n \"outputs\": [\n {\n \"components\": [\n { \"internalType\": \"bool\", \"name\": \"success\", \"type\": \"bool\" },\n { \"internalType\": \"bytes\", \"name\": \"returnData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n { \"internalType\": \"address\", \"name\": \"target\", \"type\": \"address\" },\n { \"internalType\": \"bool\", \"name\": \"allowFailure\", \"type\": \"bool\" },\n { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" },\n { \"internalType\": \"bytes\", \"name\": \"callData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Call3Value[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"aggregate3Value\",\n \"outputs\": [\n {\n \"components\": [\n { \"internalType\": \"bool\", \"name\": \"success\", \"type\": \"bool\" },\n { \"internalType\": \"bytes\", \"name\": \"returnData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n { \"internalType\": \"address\", \"name\": \"target\", \"type\": \"address\" },\n { \"internalType\": \"bytes\", \"name\": \"callData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Call[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"blockAndAggregate\",\n \"outputs\": [\n { \"internalType\": \"uint256\", \"name\": \"blockNumber\", \"type\": \"uint256\" },\n { \"internalType\": \"bytes32\", \"name\": \"blockHash\", \"type\": \"bytes32\" },\n {\n \"components\": [\n { \"internalType\": \"bool\", \"name\": \"success\", \"type\": \"bool\" },\n { \"internalType\": \"bytes\", \"name\": \"returnData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getBasefee\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"basefee\", \"type\": \"uint256\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [{ \"internalType\": \"uint256\", \"name\": \"blockNumber\", \"type\": \"uint256\" }],\n \"name\": \"getBlockHash\",\n \"outputs\": [{ \"internalType\": \"bytes32\", \"name\": \"blockHash\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getBlockNumber\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"blockNumber\", \"type\": \"uint256\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getChainId\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"chainid\", \"type\": \"uint256\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getCurrentBlockCoinbase\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"coinbase\", \"type\": \"address\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getCurrentBlockDifficulty\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"difficulty\", \"type\": \"uint256\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getCurrentBlockGasLimit\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"gaslimit\", \"type\": \"uint256\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getCurrentBlockTimestamp\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"timestamp\", \"type\": \"uint256\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [{ \"internalType\": \"address\", \"name\": \"addr\", \"type\": \"address\" }],\n \"name\": \"getEthBalance\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getLastBlockHash\",\n \"outputs\": [{ \"internalType\": \"bytes32\", \"name\": \"blockHash\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"bool\", \"name\": \"requireSuccess\", \"type\": \"bool\" },\n {\n \"components\": [\n { \"internalType\": \"address\", \"name\": \"target\", \"type\": \"address\" },\n { \"internalType\": \"bytes\", \"name\": \"callData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Call[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"tryAggregate\",\n \"outputs\": [\n {\n \"components\": [\n { \"internalType\": \"bool\", \"name\": \"success\", \"type\": \"bool\" },\n { \"internalType\": \"bytes\", \"name\": \"returnData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"bool\", \"name\": \"requireSuccess\", \"type\": \"bool\" },\n {\n \"components\": [\n { \"internalType\": \"address\", \"name\": \"target\", \"type\": \"address\" },\n { \"internalType\": \"bytes\", \"name\": \"callData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Call[]\",\n \"name\": \"calls\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"tryBlockAndAggregate\",\n \"outputs\": [\n { \"internalType\": \"uint256\", \"name\": \"blockNumber\", \"type\": \"uint256\" },\n { \"internalType\": \"bytes32\", \"name\": \"blockHash\", \"type\": \"bytes32\" },\n {\n \"components\": [\n { \"internalType\": \"bool\", \"name\": \"success\", \"type\": \"bool\" },\n { \"internalType\": \"bytes\", \"name\": \"returnData\", \"type\": \"bytes\" }\n ],\n \"internalType\": \"struct Multicall3.Result[]\",\n \"name\": \"returnData\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n }\n]\n") . expect ("invalid abi") + ethers_core::utils::__serde_json::from_str(__ABI).expect("invalid abi") }); pub struct Multicall3(ethers_contract::Contract); impl Clone for Multicall3 { diff --git a/ethers-core/src/abi/human_readable/mod.rs b/ethers-core/src/abi/human_readable/mod.rs index 192fa42c..db5d97ac 100644 --- a/ethers-core/src/abi/human_readable/mod.rs +++ b/ethers-core/src/abi/human_readable/mod.rs @@ -23,7 +23,7 @@ pub struct AbiParser { /// /// Note: we need to map the index of the event here because events can contain nameless inputs pub event_params: HashMap<(String, usize), String>, - /// (function name) -> Vec all structs the function returns + /// (function name) -> `Vec` all structs the function returns pub outputs: HashMap>, } diff --git a/ethers-core/src/types/block.rs b/ethers-core/src/types/block.rs index 66b38871..768507d6 100644 --- a/ethers-core/src/types/block.rs +++ b/ethers-core/src/types/block.rs @@ -14,7 +14,7 @@ use thiserror::Error; /// The block type returned from RPC calls. /// This is generic over a `TX` type which will be either the hash or the full transaction, -/// i.e. `Block` or Block`. +/// i.e. `Block` or `Block`. #[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)] pub struct Block { /// Hash of the block diff --git a/ethers-core/src/types/serde_helpers.rs b/ethers-core/src/types/serde_helpers.rs index 87c64e51..689c9e7f 100644 --- a/ethers-core/src/types/serde_helpers.rs +++ b/ethers-core/src/types/serde_helpers.rs @@ -231,7 +231,7 @@ impl From for BlockNumber { /// > blockNumber: QUANTITY - a block number /// > blockHash: DATA - a block hash /// -/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md +/// /// /// EIP-1898 does not all calls that use `BlockNumber` like `eth_getBlockByNumber` and doesn't list /// raw integers as supported. diff --git a/ethers-core/src/types/transaction/eip712.rs b/ethers-core/src/types/transaction/eip712.rs index 29808d3d..b608652a 100644 --- a/ethers-core/src/types/transaction/eip712.rs +++ b/ethers-core/src/types/transaction/eip712.rs @@ -490,7 +490,7 @@ pub struct TypedData { /// According to the MetaMask implementation, /// the message parameter may be JSON stringified in versions later than V1 -/// See https://github.com/MetaMask/metamask-extension/blob/0dfdd44ae7728ed02cbf32c564c75b74f37acf77/app/scripts/metamask-controller.js#L1736 +/// See /// In fact, ethers.js JSON stringifies the message at the time of writing. impl<'de> Deserialize<'de> for TypedData { fn deserialize(deserializer: D) -> Result diff --git a/ethers-etherscan/src/contract.rs b/ethers-etherscan/src/contract.rs index 86aedda2..ae19abf6 100644 --- a/ethers-etherscan/src/contract.rs +++ b/ethers-etherscan/src/contract.rs @@ -132,8 +132,8 @@ pub struct Metadata { /// The constructor arguments the contract was deployed with. pub constructor_arguments: Bytes, - /// The version of the EVM the contract was deployed in. Can be either a variant of - /// [EvmVersion] or "Default" which indicates the compiler's default. + /// The version of the EVM the contract was deployed in. Can be either a variant of EvmVersion + /// or "Default" which indicates the compiler's default. #[serde(rename = "EVMVersion")] pub evm_version: String, diff --git a/ethers-solc/src/artifact_output/mod.rs b/ethers-solc/src/artifact_output/mod.rs index e6f27a70..e1ec2854 100644 --- a/ethers-solc/src/artifact_output/mod.rs +++ b/ethers-solc/src/artifact_output/mod.rs @@ -62,7 +62,7 @@ impl ArtifactId { self } - /// Returns a : slug that identifies an artifact + /// Returns a `:` slug that identifies an artifact /// /// Note: This identifier is not necessarily unique. If two contracts have the same name, they /// will share the same slug. For a unique identifier see [ArtifactId::identifier]. @@ -70,12 +70,12 @@ impl ArtifactId { format!("{}.json:{}", self.path.file_stem().unwrap().to_string_lossy(), self.name) } - /// Returns a : slug that uniquely identifies an artifact + /// Returns a `:` slug that uniquely identifies an artifact pub fn identifier(&self) -> String { format!("{}:{}", self.source.to_string_lossy(), self.name) } - /// Returns a : slug that identifies an artifact + /// Returns a `:` slug that identifies an artifact pub fn slug_versioned(&self) -> String { format!( "{}.{}.{}.{}.json:{}", diff --git a/src/lib.rs b/src/lib.rs index ce0e9515..151575b4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ #![warn(missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub)] -#![deny(broken_intra_doc_links)] +#![deny(rustdoc::broken_intra_doc_links)] #![doc(test( no_crate_inject, attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))