Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

fix: rustdoc errors #1808

Merged
merged 5 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ethers-contract/ethers-contract-abigen/src/filter.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 2 additions & 0 deletions ethers-contract/ethers-contract-abigen/src/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion ethers-contract/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
17 changes: 14 additions & 3 deletions ethers-contract/src/multicall/multicall_contract.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ethers-core/src/abi/human_readable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
}

Expand Down
2 changes: 1 addition & 1 deletion ethers-core/src/types/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ethers-core/src/types/serde_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ethers-core/src/types/transaction/eip712.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions ethers-etherscan/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
8 changes: 4 additions & 4 deletions ethers-solc/src/artifact_output/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ 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].
pub fn slug(&self) -> String {
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:{}",
Expand Down Expand Up @@ -1133,7 +1133,7 @@ mod tests {

let alternative = ConfigurableArtifacts::conflict_free_output_file(
&already_taken,
conflict.clone(),
conflict,
file,
"/Users/carter/dev/goldfinch/mono/packages/protocol/artifacts",
);
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -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))
Expand Down