From 2f0654e50df38397373c2097a9d036c31f1a448e Mon Sep 17 00:00:00 2001 From: hauke strasdat Date: Sat, 13 Jan 2024 17:28:29 -0800 Subject: [PATCH] style: clippy fixes --- src/actors/printer.rs | 2 +- src/compute/pipeline.rs | 2 +- src/lib.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) 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..d4a60a3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -174,20 +174,20 @@ //! # 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() //! }, //! ); -//! let mut time_printer = Printer::::new_default_init_state( +//! let mut time_printer = Printer::::from_prop_and_state( //! context, //! PrinterProp { //! topic: "time".to_string(), //! }, //! ); -//! let mut average_printer = Printer::::new_default_init_state( +//! let mut average_printer = Printer::::from_prop_and_state( //! context, //! PrinterProp { //! topic: "average".to_string(),