Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Nov 26, 2024
1 parent 0941800 commit d4460d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion substrate/frame/revive/rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn extract_revert_message(exec_data: &[u8]) -> Option<String> {
match function_selector {
// assert(false)
[0x4E, 0x48, 0x7B, 0x71] => {
let panic_code: u32 = U256::from_big_endian(&exec_data.get(4..36)?).try_into().ok()?;
let panic_code: u32 = U256::from_big_endian(exec_data.get(4..36)?).try_into().ok()?;

// See https://docs.soliditylang.org/en/latest/control-structures.html#panic-via-assert-and-error-via-require
let msg = match panic_code {
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/revive/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl EthRpcServer for EthRpcServerImpl {
block: Option<BlockNumberOrTag>,
) -> RpcResult<U256> {
let dry_run = self.client.dry_run(transaction, block.unwrap_or_default().into()).await?;
Ok(U256::from(dry_run.eth_gas))
Ok(dry_run.eth_gas)
}

async fn call(
Expand Down

0 comments on commit d4460d6

Please sign in to comment.