From 5467f0a573c915d9c1a8c032803109b495784b29 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Wed, 23 Sep 2020 11:04:52 +0200 Subject: [PATCH] io: move #[cfg(not(loom))] to fix warning (#2864) --- tokio/src/io/stdio_common.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio/src/io/stdio_common.rs b/tokio/src/io/stdio_common.rs index 66094d129..a86ca3757 100644 --- a/tokio/src/io/stdio_common.rs +++ b/tokio/src/io/stdio_common.rs @@ -83,6 +83,7 @@ where } #[cfg(test)] +#[cfg(not(loom))] mod tests { use crate::io::AsyncWriteExt; use std::io; @@ -114,8 +115,8 @@ mod tests { Poll::Ready(Ok(())) } } + #[test] - #[cfg(not(loom))] fn test_splitter() { let data = str::repeat("█", MAX_BUF); let mut wr = super::SplitByUtf8BoundaryIfWindows::new(MockWriter);