diff --git a/binaries/cli/src/build.rs b/binaries/cli/src/build.rs index c7b46ff7..d3dd160f 100644 --- a/binaries/cli/src/build.rs +++ b/binaries/cli/src/build.rs @@ -18,7 +18,7 @@ pub fn build(dataflow: &Path) -> eyre::Result<()> { match &node.kind { dora_core::descriptor::NodeKind::Runtime(runtime_node) => { for operator in &runtime_node.operators { - run_build_command(operator.config.build.as_deref(), &working_dir) + run_build_command(operator.config.build.as_deref(), working_dir) .with_context(|| { format!( "build command failed for operator `{}/{}`", @@ -28,12 +28,12 @@ pub fn build(dataflow: &Path) -> eyre::Result<()> { } } dora_core::descriptor::NodeKind::Custom(custom_node) => { - run_build_command(custom_node.build.as_deref(), &working_dir).with_context( + run_build_command(custom_node.build.as_deref(), working_dir).with_context( || format!("build command failed for custom node `{}`", node.id), )? } dora_core::descriptor::NodeKind::Operator(operator) => { - run_build_command(operator.config.build.as_deref(), &working_dir).with_context( + run_build_command(operator.config.build.as_deref(), working_dir).with_context( || { format!( "build command failed for operator `{}/{}`", diff --git a/binaries/cli/src/check.rs b/binaries/cli/src/check.rs index 1d4411eb..6643d483 100644 --- a/binaries/cli/src/check.rs +++ b/binaries/cli/src/check.rs @@ -8,7 +8,7 @@ use std::{env::consts::EXE_EXTENSION, path::Path}; pub fn check(dataflow_path: &Path, runtime: &Path) -> eyre::Result<()> { let runtime = runtime.with_extension(EXE_EXTENSION); - let descriptor = read_descriptor(&dataflow_path).wrap_err_with(|| { + let descriptor = read_descriptor(dataflow_path).wrap_err_with(|| { format!( "failed to read dataflow descriptor at {}", dataflow_path.display() @@ -108,7 +108,7 @@ fn check_input( nodes: &[dora_core::descriptor::ResolvedNode], input_id_str: &str, ) -> Result<(), eyre::ErrReport> { - Ok(match mapping { + match mapping { InputMapping::Timer { interval: _ } => {} InputMapping::User(UserInputMapping { source, @@ -162,5 +162,6 @@ fn check_input( } } } - }) + }; + Ok(()) } diff --git a/binaries/cli/src/graph/mod.rs b/binaries/cli/src/graph/mod.rs index bf53fb9b..26d4d414 100644 --- a/binaries/cli/src/graph/mod.rs +++ b/binaries/cli/src/graph/mod.rs @@ -11,7 +11,7 @@ pub fn visualize_as_html(dataflow: &Path) -> eyre::Result { } pub fn visualize_as_mermaid(dataflow: &Path) -> eyre::Result { - let descriptor = read_descriptor(&dataflow) + let descriptor = read_descriptor(dataflow) .with_context(|| format!("failed to read dataflow at `{}`", dataflow.display()))?; let visualized = descriptor .visualize_as_mermaid() diff --git a/examples/iceoryx/node/src/main.rs b/examples/iceoryx/node/src/main.rs index bda2decb..06437786 100644 --- a/examples/iceoryx/node/src/main.rs +++ b/examples/iceoryx/node/src/main.rs @@ -18,7 +18,7 @@ fn main() -> eyre::Result<()> { let random: u64 = rand::random(); let data: &[u8] = &random.to_le_bytes(); operator.send_output(&output, input.metadata(), data.len(), |out| { - out.copy_from_slice(&data); + out.copy_from_slice(data); })?; } other => eprintln!("Ignoring unexpected input `{other}`"), diff --git a/libraries/communication-layer/src/lib.rs b/libraries/communication-layer/src/lib.rs index 922ebd02..91fe66a9 100644 --- a/libraries/communication-layer/src/lib.rs +++ b/libraries/communication-layer/src/lib.rs @@ -54,7 +54,7 @@ pub trait Publisher: Send + Sync { /// can be used to construct the message in-place. fn publish(&self, data: &[u8]) -> Result<(), BoxError> { let mut sample = self.prepare(data.len())?; - sample.as_mut_slice().copy_from_slice(&data); + sample.as_mut_slice().copy_from_slice(data); sample.publish()?; Ok(()) }