diff --git a/src/actors/printer.rs b/src/actors/printer.rs index c52459f..dfeb220 100644 --- a/src/actors/printer.rs +++ b/src/actors/printer.rs @@ -95,7 +95,7 @@ impl ) -> Self { let m = InboundChannel::new( builder.context, - actor_name.clone(), + actor_name, &builder.sender, PrinterInboundMessage::Printable(T::default()).inbound_channel(), ); diff --git a/src/compute/pipeline.rs b/src/compute/pipeline.rs index 4a7c321..a0c27b7 100644 --- a/src/compute/pipeline.rs +++ b/src/compute/pipeline.rs @@ -15,7 +15,7 @@ pub enum CancelRequest { impl CancelRequest { /// Unique name for cancel request inbound channel. This special inbound channel is not /// associated with any actor but with the pipeline itself. - pub const CANCEL_REQUEST_INBOUND_CHANNEL: &str = "CANCEL"; + pub const CANCEL_REQUEST_INBOUND_CHANNEL: &'static str = "CANCEL"; } impl InboundMessage for CancelRequest { diff --git a/src/lib.rs b/src/lib.rs index bcef9b2..2590893 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -174,24 +174,27 @@ //! # use hollywood::examples::moving_average::{MovingAverage, MovingAverageProp}; //! let pipeline = Context::configure(&mut |context| { //! let mut timer = Periodic::new_with_period(context, 1.0); -//! let mut moving_average = MovingAverage::new_default_init_state( +//! let mut moving_average = MovingAverage::from_prop_and_state( //! context, //! MovingAverageProp { //! alpha: 0.3, //! ..Default::default() //! }, +//! MovingAverageState::default(), //! ); -//! let mut time_printer = Printer::::new_default_init_state( +//! let mut time_printer = Printer::::from_prop_and_state( //! context, //! PrinterProp { //! topic: "time".to_string(), //! }, +//! PrinterState::default(), //! ); -//! let mut average_printer = Printer::::new_default_init_state( +//! let mut average_printer = Printer::::from_prop_and_state( //! context, //! PrinterProp { //! topic: "average".to_string(), //! }, +//! PrinterState::default(), //! ); //! timer //! .outbound