From 42af7f7e56f437ff219ec211b374398d82d07ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Wed, 15 May 2024 10:11:47 +0200 Subject: [PATCH] Fix new clippy warnings --- src/lib.rs | 4 ---- src/scheduler/assembly_impl.rs | 13 ++++++------- src/scheduler/dependencies.rs | 1 - 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7360bd8..a9a920a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,14 +65,10 @@ extern crate array_macro; #[macro_use] extern crate assert_matches; #[macro_use] -extern crate index_vec; -#[macro_use] extern crate log; #[cfg(feature = "parallel-runtime")] extern crate rayon; #[macro_use] -extern crate smallvec; -#[macro_use] extern crate static_assertions; #[macro_use] extern crate cfg_if; diff --git a/src/scheduler/assembly_impl.rs b/src/scheduler/assembly_impl.rs index a143a5c..668ca48 100644 --- a/src/scheduler/assembly_impl.rs +++ b/src/scheduler/assembly_impl.rs @@ -119,7 +119,7 @@ where } /// Final result of the assembly of a reactor. -pub struct FinishedReactor<'x, S>(AssemblyCtx<'x, S>, S) +pub struct FinishedReactor(S) where S: ReactorInitializer; @@ -147,9 +147,9 @@ where pub fn assemble( self, build_reactor_tree: impl FnOnce(Self) -> AssemblyResult>, - ) -> AssemblyResult> { - let AssemblyIntermediate(ich, reactor) = build_reactor_tree(self)?; - Ok(FinishedReactor(ich, reactor)) + ) -> AssemblyResult> { + let AssemblyIntermediate(_, reactor) = build_reactor_tree(self)?; + Ok(FinishedReactor(reactor)) } /// Innermost function. @@ -303,13 +303,12 @@ where } } -impl FinishedReactor<'_, S> +impl FinishedReactor where S: ReactorInitializer, { fn finish(self) -> S { - let FinishedReactor(_, reactor) = self; - reactor + self.0 } } diff --git a/src/scheduler/dependencies.rs b/src/scheduler/dependencies.rs index f52b362..0a94cc3 100644 --- a/src/scheduler/dependencies.rs +++ b/src/scheduler/dependencies.rs @@ -342,7 +342,6 @@ enum EdgeWeight { /// if they're labeled `Default`, they're trigger dependencies, /// otherwise use dependencies. Default, - /// Use, }