Skip to content

Commit

Permalink
test: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivanruth committed Jul 16, 2024
1 parent 6c5db43 commit 9b796f0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tokio-test/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
),
_ => (),
});
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 9b796f0

Please sign in to comment.