From e926b6dbc3e64716a5931cd46f70618355bd46d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Thu, 11 Jan 2024 11:08:20 +0100 Subject: [PATCH] digital_io: add clippy exception for the #[cfg(test)] variant of mod gpio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clippy disallows #[cfg(test)] mods that are followed by other code by default[1] and usually this makes sense, because tests should be at the end of the file, but in our case the mod does not contain tests but instead imports a test-specific variant of the gpio mod. Allow that. [1]: https://rust-lang.github.io/rust-clippy/master/index.html#/items_after_test_module Signed-off-by: Leonard Göhrs --- src/digital_io.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/digital_io.rs b/src/digital_io.rs index 63eb9c7e..f241011a 100644 --- a/src/digital_io.rs +++ b/src/digital_io.rs @@ -22,6 +22,7 @@ use async_std::task::spawn; use crate::broker::{BrokerBuilder, Topic}; use crate::led::BlinkPattern; +#[allow(clippy::items_after_test_module)] #[cfg(test)] mod gpio { mod test;