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

Commit

Permalink
chore(clippy): make clippy happy (#2663)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Nov 4, 2023
1 parent 66b81d7 commit 21dabd4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
5 changes: 4 additions & 1 deletion ethers-core/src/types/i256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,10 @@ impl I256 {
(255.., Sign::Negative) => Self::minus_one(),

// Rust cannot prove that the above is exhaustive for usize (works for any other int)
_ => unreachable!(),
#[allow(unreachable_patterns)]
_ => {
unreachable!()
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions ethers-core/src/types/transaction/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ mod tests {
// https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction_signing_test.go
// Tests that the rlp decoding properly extracts the from address
let rlp_transactions =
vec!["f864808504a817c800825208943535353535353535353535353535353535353535808025a0044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116da0044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
["f864808504a817c800825208943535353535353535353535353535353535353535808025a0044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116da0044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
"f864018504a817c80182a410943535353535353535353535353535353535353535018025a0489efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bcaa0489efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6",
"f864028504a817c80282f618943535353535353535353535353535353535353535088025a02d7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5a02d7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5",
"f865038504a817c803830148209435353535353535353535353535353535353535351b8025a02a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4e0a02a80e1ef1d7842f27f2e6be0972bb708b9a135c38860dbe73c27c3486c34f4de",
Expand All @@ -533,7 +533,7 @@ mod tests {
.map(|rlp_str| hex::decode(rlp_str).unwrap())
.collect::<Vec<Vec<u8>>>();

let raw_addresses = vec![
let raw_addresses = [
"0xf0f6f18bca1b28cd68e4357452947e021241e9ce",
"0x23ef145a395ea3fa3deb533b8a9e1b4c6c25d112",
"0x2e485e0c23b4c3c542628a5f672eeab0ad4888be",
Expand Down
12 changes: 4 additions & 8 deletions ethers-providers/src/rpc/transports/ws/types.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use std::fmt;

use crate::{common::Request, JsonRpcError};
use ethers_core::types::U256;
use futures_channel::{mpsc, oneshot};
use serde::{de, Deserialize};
use serde_json::value::{to_raw_value, RawValue};

use crate::{common::Request, JsonRpcError};
use std::fmt;

// Normal JSON-RPC response
pub type Response = Result<Box<RawValue>, JsonRpcError>;
Expand Down Expand Up @@ -261,7 +259,7 @@ mod aliases {
mod aliases {
pub use tokio_tungstenite::{
connect_async, connect_async_with_config,
tungstenite::{self, protocol::CloseFrame},
tungstenite::{self},
};
use tokio_tungstenite::{MaybeTlsStream, WebSocketStream};
pub type WebSocketConfig = tungstenite::protocol::WebSocketConfig;
Expand All @@ -270,10 +268,8 @@ mod aliases {
pub type WsStreamItem = Result<Message, WsError>;

pub use http::Request as HttpRequest;
pub use tracing::{debug, error, trace, warn};
pub use tungstenite::client::IntoClientRequest;

pub use tokio::time::sleep;
pub use tungstenite::client::IntoClientRequest;

pub type InternalStream =
futures_util::stream::Fuse<WebSocketStream<MaybeTlsStream<tokio::net::TcpStream>>>;
Expand Down

0 comments on commit 21dabd4

Please sign in to comment.