From fdba3e96947481be21fee0e73b9f9bb724a9e559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Blankfors?= Date: Wed, 6 Mar 2024 10:48:45 +0100 Subject: [PATCH] fix: Get rid of some unnecessary trait bounds Note: It's often tempting to put trait bounds on structs but in most scenarios the general rule of thumb should be to use trait bounds in impl blocks but let structs just declare data structures and not behavior. For further reading: https://stackoverflow.com/questions/49229332/should-trait-bounds-be-duplicated-in-struct-and-impl --- libsigner/src/runloop.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libsigner/src/runloop.rs b/libsigner/src/runloop.rs index 32b032600..54dd58e17 100644 --- a/libsigner/src/runloop.rs +++ b/libsigner/src/runloop.rs @@ -93,12 +93,7 @@ pub trait SignerRunLoop { } /// The top-level signer implementation -pub struct Signer< - CMD: Send, - R: Send, - SL: SignerRunLoop + Send + Sync, - EV: EventReceiver + Send, -> { +pub struct Signer { /// the runloop itself signer_loop: Option, /// the event receiver to use @@ -107,8 +102,6 @@ pub struct Signer< command_receiver: Option>, /// the result sender to use result_sender: Option>, - /// marker to permit the R type - _phantom: PhantomData, } /// The running signer implementation @@ -215,7 +208,6 @@ impl< event_receiver: Some(event_receiver), command_receiver: Some(command_receiver), result_sender: Some(result_sender), - _phantom: PhantomData, } }