From 7a63bdb7300c4732ed90129b96c447a8af590091 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Wed, 6 Mar 2024 18:30:43 +0100 Subject: [PATCH] chore: clippy --- ethers-contract/tests/it/abigen.rs | 11 ++++++----- ethers-providers/src/rpc/transports/legacy_ws.rs | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ethers-contract/tests/it/abigen.rs b/ethers-contract/tests/it/abigen.rs index a23bf5e9a..07872e592 100644 --- a/ethers-contract/tests/it/abigen.rs +++ b/ethers-contract/tests/it/abigen.rs @@ -746,13 +746,14 @@ fn can_generate_large_tuple_types() { fn can_generate_large_tuple_array() { abigen!(LargeArray, "./tests/solidity-contracts/large-array.json"); - impl Default for CallWithLongArrayCall { - fn default() -> Self { - Self { long_array: [0; 128] } + const _: () = { + impl Default for CallWithLongArrayCall { + fn default() -> Self { + Self { long_array: [0; 128] } + } } - } + }; - let _call = CallWithLongArrayCall::default(); assert_call::(); } diff --git a/ethers-providers/src/rpc/transports/legacy_ws.rs b/ethers-providers/src/rpc/transports/legacy_ws.rs index 705cb58c6..bd40566e9 100644 --- a/ethers-providers/src/rpc/transports/legacy_ws.rs +++ b/ethers-providers/src/rpc/transports/legacy_ws.rs @@ -121,9 +121,9 @@ impl Debug for Ws { impl Ws { /// Initializes a new WebSocket Client, given a Stream/Sink Websocket implementer. /// The websocket connection must be initiated separately. - pub fn new(ws: S) -> Self + pub fn new(ws: S) -> Self where - S: Send + Sync + Stream + Sink + Unpin, + S: Send + Sync + Stream + Sink + Unpin + 'static, { let (sink, stream) = mpsc::unbounded(); // Spawn the server