fix: rustdoc errors (#1808)
* fix: rustdoc warnings * fix: partially re-run abigen for multicall_contract * fix * fix test * fix: rustdoc nightly warnings
This commit is contained in:
parent
debd6fec3d
commit
fb88215a87
|
@ -225,7 +225,7 @@ pub struct InternalStructs {
|
||||||
/// from ethabi.
|
/// from ethabi.
|
||||||
pub(crate) function_params: HashMap<(String, String), String>,
|
pub(crate) function_params: HashMap<(String, String), String>,
|
||||||
|
|
||||||
/// (function name) -> Vec<structs> all structs the function returns
|
/// (function name) -> `Vec<structs>` all structs the function returns
|
||||||
pub(crate) outputs: HashMap<String, Vec<String>>,
|
pub(crate) outputs: HashMap<String, Vec<String>>,
|
||||||
|
|
||||||
/// (event name, idx) -> struct which are the identifying properties we get the name
|
/// (event name, idx) -> struct which are the identifying properties we get the name
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//! Filtering support for contracts used in [`Abigen`]
|
//! Filtering support for contracts used in [`Abigen`][crate::Abigen]
|
||||||
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
|
@ -99,6 +99,7 @@ impl MultiAbigen {
|
||||||
/// let gen = MultiAbigen::from_json_files("./abi").unwrap().with_filter(
|
/// let gen = MultiAbigen::from_json_files("./abi").unwrap().with_filter(
|
||||||
/// SelectContracts::default().add_name("MyContract").add_name("MyOtherContract"),
|
/// SelectContracts::default().add_name("MyContract").add_name("MyOtherContract"),
|
||||||
/// );
|
/// );
|
||||||
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Exclude all contracts that end with test
|
/// Exclude all contracts that end with test
|
||||||
|
@ -109,6 +110,7 @@ impl MultiAbigen {
|
||||||
/// let gen = MultiAbigen::from_json_files("./abi").unwrap().with_filter(
|
/// let gen = MultiAbigen::from_json_files("./abi").unwrap().with_filter(
|
||||||
/// ExcludeContracts::default().add_pattern(".*Test"),
|
/// ExcludeContracts::default().add_pattern(".*Test"),
|
||||||
/// );
|
/// );
|
||||||
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_filter(mut self, filter: impl Into<ContractFilter>) -> Self {
|
pub fn with_filter(mut self, filter: impl Into<ContractFilter>) -> Self {
|
||||||
|
|
|
@ -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)_
|
/// _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`]: macro.abigen.html
|
||||||
/// [`Abigen` builder]: crate::Abigen
|
/// [`Abigen` builder]: struct.Abigen.html
|
||||||
/// [`event`]: method@crate::Contract::event
|
/// [`event`]: method@crate::Contract::event
|
||||||
/// [`method`]: method@crate::Contract::method
|
/// [`method`]: method@crate::Contract::method
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -23,7 +23,7 @@ pub struct AbiParser {
|
||||||
///
|
///
|
||||||
/// Note: we need to map the index of the event here because events can contain nameless inputs
|
/// Note: we need to map the index of the event here because events can contain nameless inputs
|
||||||
pub event_params: HashMap<(String, usize), String>,
|
pub event_params: HashMap<(String, usize), String>,
|
||||||
/// (function name) -> Vec<structs> all structs the function returns
|
/// (function name) -> `Vec<structs>` all structs the function returns
|
||||||
pub outputs: HashMap<String, Vec<String>>,
|
pub outputs: HashMap<String, Vec<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ use thiserror::Error;
|
||||||
|
|
||||||
/// The block type returned from RPC calls.
|
/// The block type returned from RPC calls.
|
||||||
/// This is generic over a `TX` type which will be either the hash or the full transaction,
|
/// This is generic over a `TX` type which will be either the hash or the full transaction,
|
||||||
/// i.e. `Block<TxHash>` or Block<Transaction>`.
|
/// i.e. `Block<TxHash>` or `Block<Transaction>`.
|
||||||
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)]
|
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)]
|
||||||
pub struct Block<TX> {
|
pub struct Block<TX> {
|
||||||
/// Hash of the block
|
/// Hash of the block
|
||||||
|
|
|
@ -231,7 +231,7 @@ impl From<LenientBlockNumber> for BlockNumber {
|
||||||
/// > blockNumber: QUANTITY - a block number
|
/// > blockNumber: QUANTITY - a block number
|
||||||
/// > blockHash: DATA - a block hash
|
/// > blockHash: DATA - a block hash
|
||||||
///
|
///
|
||||||
/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md
|
/// <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
|
/// EIP-1898 does not all calls that use `BlockNumber` like `eth_getBlockByNumber` and doesn't list
|
||||||
/// raw integers as supported.
|
/// raw integers as supported.
|
||||||
|
|
|
@ -490,7 +490,7 @@ pub struct TypedData {
|
||||||
|
|
||||||
/// According to the MetaMask implementation,
|
/// According to the MetaMask implementation,
|
||||||
/// the message parameter may be JSON stringified in versions later than V1
|
/// 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 <https://github.com/MetaMask/metamask-extension/blob/0dfdd44ae7728ed02cbf32c564c75b74f37acf77/app/scripts/metamask-controller.js#L1736>
|
||||||
/// In fact, ethers.js JSON stringifies the message at the time of writing.
|
/// In fact, ethers.js JSON stringifies the message at the time of writing.
|
||||||
impl<'de> Deserialize<'de> for TypedData {
|
impl<'de> Deserialize<'de> for TypedData {
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||||
|
|
|
@ -132,8 +132,8 @@ pub struct Metadata {
|
||||||
/// The constructor arguments the contract was deployed with.
|
/// The constructor arguments the contract was deployed with.
|
||||||
pub constructor_arguments: Bytes,
|
pub constructor_arguments: Bytes,
|
||||||
|
|
||||||
/// The version of the EVM the contract was deployed in. Can be either a variant of
|
/// The version of the EVM the contract was deployed in. Can be either a variant of EvmVersion
|
||||||
/// [EvmVersion] or "Default" which indicates the compiler's default.
|
/// or "Default" which indicates the compiler's default.
|
||||||
#[serde(rename = "EVMVersion")]
|
#[serde(rename = "EVMVersion")]
|
||||||
pub evm_version: String,
|
pub evm_version: String,
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ impl ArtifactId {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a <filename>:<name> slug that identifies an artifact
|
/// Returns a `<filename>:<name>` slug that identifies an artifact
|
||||||
///
|
///
|
||||||
/// Note: This identifier is not necessarily unique. If two contracts have the same name, they
|
/// 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].
|
/// 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)
|
format!("{}.json:{}", self.path.file_stem().unwrap().to_string_lossy(), self.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a <source path>:<name> slug that uniquely identifies an artifact
|
/// Returns a `<source path>:<name>` slug that uniquely identifies an artifact
|
||||||
pub fn identifier(&self) -> String {
|
pub fn identifier(&self) -> String {
|
||||||
format!("{}:{}", self.source.to_string_lossy(), self.name)
|
format!("{}:{}", self.source.to_string_lossy(), self.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a <filename><version>:<name> slug that identifies an artifact
|
/// Returns a `<filename><version>:<name>` slug that identifies an artifact
|
||||||
pub fn slug_versioned(&self) -> String {
|
pub fn slug_versioned(&self) -> String {
|
||||||
format!(
|
format!(
|
||||||
"{}.{}.{}.{}.json:{}",
|
"{}.{}.{}.{}.json:{}",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub)]
|
#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub)]
|
||||||
#![deny(broken_intra_doc_links)]
|
#![deny(rustdoc::broken_intra_doc_links)]
|
||||||
#![doc(test(
|
#![doc(test(
|
||||||
no_crate_inject,
|
no_crate_inject,
|
||||||
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
||||||
|
|
Loading…
Reference in New Issue