From 9b796f042e383fd5e356226eeea3b20d719e7133 Mon Sep 17 00:00:00 2001 From: Joeri van Ruth Date: Tue, 16 Jul 2024 17:57:04 +0200 Subject: [PATCH] test: fix formatting --- tokio-test/src/io.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tokio-test/src/io.rs b/tokio-test/src/io.rs index 3bc9deef3a8..b9990b767d1 100644 --- a/tokio-test/src/io.rs +++ b/tokio-test/src/io.rs @@ -476,8 +476,16 @@ impl Drop for Mock { } self.inner.actions.iter().for_each(|a| match a { - Action::Read(data) => assert!(data.is_empty(), "There is still data left to read: {:?}", ShowBytes(data, 10)), - Action::Write(data) => assert!(data.is_empty(), "There is still data left to write: {:?}", ShowBytes(data, 10)), + Action::Read(data) => assert!( + data.is_empty(), + "There is still data left to read: {:?}", + ShowBytes(data, 10) + ), + Action::Write(data) => assert!( + data.is_empty(), + "There is still data left to write: {:?}", + ShowBytes(data, 10) + ), _ => (), }); } @@ -510,7 +518,7 @@ impl fmt::Debug for Inner { } } -struct ShowBytes<'a>(&'a[u8], usize); +struct ShowBytes<'a>(&'a [u8], usize); impl<'a> fmt::Debug for ShowBytes<'a> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {