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

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Dec 9, 2021
1 parent 27597cb commit 1798b97
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ethers-contract/src/multicall/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl<M: Middleware> Multicall<M> {
/// If more than the maximum number of supported calls are added. The maximum
/// limits is constrained due to tokenization/detokenization support for tuples
pub fn add_call<D: Detokenize>(&mut self, call: ContractCall<M, D>) -> &mut Self {
assert!(!(self.calls.len() >= 16), "Cannot support more than {} calls", 16);
assert!(self.calls.len() < 16, "Cannot support more than {} calls", 16);

match (call.tx.to(), call.tx.data()) {
(Some(NameOrAddress::Address(target)), Some(data)) => {
Expand Down
2 changes: 1 addition & 1 deletion ethers-etherscan/src/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ mod tests {
assert!(oracle.fast_gas_price > 0);
assert!(oracle.last_block > 0);
assert!(oracle.suggested_base_fee > 0.0);
assert!(oracle.gas_used_ratio.len() > 0);
assert!(!oracle.gas_used_ratio.is_empty());
})
.await
}
Expand Down
2 changes: 1 addition & 1 deletion ethers-signers/src/ledger/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl LedgerEthereum {
let mut bytes = vec![depth as u8];
for derivation_index in elements {
let hardened = derivation_index.contains('\'');
let mut index = derivation_index.replace("'", "").parse::<u32>().unwrap();
let mut index = derivation_index.replace('\'', "").parse::<u32>().unwrap();
if hardened {
index |= 0x80000000;
}
Expand Down
2 changes: 1 addition & 1 deletion ethers-solc/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl Solc {
pub fn version_req(source: &Source) -> Result<VersionReq> {
let version = utils::find_version_pragma(&source.content)
.ok_or(SolcError::PragmaNotFound)?
.replace(" ", ",");
.replace(' ', ",");

// Somehow, Solidity semver without an operator is considered to be "exact",
// but lack of operator automatically marks the operator as Caret, so we need
Expand Down

0 comments on commit 1798b97

Please sign in to comment.