From 9bdd68843bda81110ad44d2c6b298442d5a99f91 Mon Sep 17 00:00:00 2001 From: wrk Date: Wed, 31 May 2023 10:17:39 +0200 Subject: [PATCH] allow unused vars + cargo fmt --- src/system.rs | 1 + src/system_params.rs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/system.rs b/src/system.rs index 2676f1b..16ea33a 100644 --- a/src/system.rs +++ b/src/system.rs @@ -119,6 +119,7 @@ pub(crate) trait SystemParam { arguments: &'r [&'r str], factory: &'r Factory, ) -> Self::Item<'r>; + #[allow(unused_variables)] fn valid(prefix: &IrcPrefix, arguments: &[&str], factory: &Factory) -> bool { true } diff --git a/src/system_params.rs b/src/system_params.rs index 21fae85..be101cf 100644 --- a/src/system_params.rs +++ b/src/system_params.rs @@ -129,9 +129,7 @@ impl<'a, const N: usize> SystemParam for Arguments<'a, N> { Arguments(&arguments[..N]) } - fn valid(_prefix: &IrcPrefix, - arguments: &[&str], - _factory: &Factory,) -> bool { + fn valid(_prefix: &IrcPrefix, arguments: &[&str], _factory: &Factory) -> bool { arguments.len() == N } }