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:
DaniPopes 2022-11-08 00:43:23 +01:00 committed by GitHub
parent debd6fec3d
commit fb88215a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 29 additions and 16 deletions

View File

@ -225,7 +225,7 @@ pub struct InternalStructs {
/// from ethabi.
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>>,
/// (event name, idx) -> struct which are the identifying properties we get the name

View File

@ -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;

View File

@ -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<ContractFilter>) -> Self {

View File

@ -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)]

File diff suppressed because one or more lines are too long

View File

@ -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<structs> all structs the function returns
/// (function name) -> `Vec<structs>` all structs the function returns
pub outputs: HashMap<String, Vec<String>>,
}

View File

@ -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<TxHash>` or Block<Transaction>`.
/// i.e. `Block<TxHash>` or `Block<Transaction>`.
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub struct Block<TX> {
/// Hash of the block

View File

@ -231,7 +231,7 @@ impl From<LenientBlockNumber> for BlockNumber {
/// > blockNumber: QUANTITY - a block number
/// > 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
/// raw integers as supported.

View File

@ -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 <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.
impl<'de> Deserialize<'de> for TypedData {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>

View File

@ -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,

View File

@ -62,7 +62,7 @@ impl ArtifactId {
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
/// 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 <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 {
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 {
format!(
"{}.{}.{}.{}.json:{}",

View File

@ -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))