mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-13 08:40:45 +08:00
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
This commit is contained in:
@@ -93,12 +93,7 @@ pub trait SignerRunLoop<R: Send, CMD: Send> {
|
||||
}
|
||||
|
||||
/// The top-level signer implementation
|
||||
pub struct Signer<
|
||||
CMD: Send,
|
||||
R: Send,
|
||||
SL: SignerRunLoop<R, CMD> + Send + Sync,
|
||||
EV: EventReceiver + Send,
|
||||
> {
|
||||
pub struct Signer<CMD, R, SL, EV> {
|
||||
/// the runloop itself
|
||||
signer_loop: Option<SL>,
|
||||
/// the event receiver to use
|
||||
@@ -107,8 +102,6 @@ pub struct Signer<
|
||||
command_receiver: Option<Receiver<CMD>>,
|
||||
/// the result sender to use
|
||||
result_sender: Option<Sender<R>>,
|
||||
/// marker to permit the R type
|
||||
_phantom: PhantomData<R>,
|
||||
}
|
||||
|
||||
/// 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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user