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