Skip to content

Commit e926b6d

Browse files
committed
digital_io: add clippy exception for the #[cfg(test)] variant of mod gpio
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 <l.goehrs@pengutronix.de>
1 parent e7b35a0 commit e926b6d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/digital_io.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use async_std::task::spawn;
2222
use crate::broker::{BrokerBuilder, Topic};
2323
use crate::led::BlinkPattern;
2424

25+
#[allow(clippy::items_after_test_module)]
2526
#[cfg(test)]
2627
mod gpio {
2728
mod test;

0 commit comments

Comments
 (0)