From a4714e603a33cb81ff52f3de8e40ab4d1496769f Mon Sep 17 00:00:00 2001 From: Lars Kroll Date: Fri, 18 Oct 2019 17:19:17 +0200 Subject: [PATCH] Clippy things a bit --- .clippy.toml | 1 + executor-performance/src/main.rs | 9 +++++---- executors/src/lib.rs | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .clippy.toml diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 0000000..c9a535b --- /dev/null +++ b/.clippy.toml @@ -0,0 +1 @@ +cognitive-complexity-threshold=50 diff --git a/executor-performance/src/main.rs b/executor-performance/src/main.rs index 49e8d04..5e74e21 100644 --- a/executor-performance/src/main.rs +++ b/executor-performance/src/main.rs @@ -7,6 +7,7 @@ // except according to those terms. #![cfg_attr(feature = "nightly", feature(test))] #![allow(unused_parens)] +#![allow(clippy::style)] // not important in the testing app extern crate executors; extern crate synchronoise; extern crate time; @@ -252,8 +253,8 @@ fn run_throughput_experiments( } } -fn run_throughput_experiment<'a, E: Executor + 'static>( - mut exp: crate::experiment::Experiment<'a, E>, +fn run_throughput_experiment( + mut exp: crate::experiment::Experiment<'_, E>, total_messages: f64, ) -> f64 { exp.prepare(); @@ -328,8 +329,8 @@ fn run_latency_experiments( } } -fn run_latency_experiment<'a, E: Executor + 'static>( - mut exp: crate::latency_experiment::Experiment<'a, E>, +fn run_latency_experiment( + mut exp: crate::latency_experiment::Experiment<'_, E>, total_messages: u64, ) -> Stats { exp.prepare(); diff --git a/executors/src/lib.rs b/executors/src/lib.rs index 6202e26..cc60de3 100644 --- a/executors/src/lib.rs +++ b/executors/src/lib.rs @@ -7,6 +7,7 @@ // except according to those terms. #![doc(html_root_url = "https://docs.rs/executors/0.5.3")] #![allow(unused_parens)] +#![allow(clippy::unused_unit)] //! This crate provides a number of task executors all implementing the //! [`Executor`](common/trait.Executor.html) trait.