diff --git a/nexosim-util/src/combinators.rs b/nexosim-util/src/combinators.rs index b8d6e19..89278e1 100644 --- a/nexosim-util/src/combinators.rs +++ b/nexosim-util/src/combinators.rs @@ -13,11 +13,7 @@ use nexosim::ports::{Output, Requestor}; /// /// Model input is propagated to all the connected replier ports and their /// answers are written to the model output. -pub struct ReplierAdaptor -where - T: Clone + Send + 'static, - R: Clone + Send + 'static, -{ +pub struct ReplierAdaptor { /// Requestor port to be connected to replier port. pub requestor: Requestor, @@ -25,17 +21,10 @@ where pub output: Output, } -impl ReplierAdaptor -where - T: Clone + Send + 'static, - R: Clone + Send + 'static, -{ +impl ReplierAdaptor { /// Creates a `ReplierAdaptor` model. pub fn new() -> Self { - Self { - requestor: Requestor::new(), - output: Output::new(), - } + Self::default() } /// Input port. @@ -46,9 +35,13 @@ where } } -impl Model for ReplierAdaptor -where - T: Clone + Send + 'static, - R: Clone + Send + 'static, -{ +impl Model for ReplierAdaptor {} + +impl Default for ReplierAdaptor { + fn default() -> Self { + Self { + requestor: Requestor::new(), + output: Output::new(), + } + } }