summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2023-01-13 10:16:58 +0100
committerMatthias Beyer <mail@beyermatthias.de>2023-01-18 09:07:41 +0100
commit368f9626a2c18a1a2d7732651e5ec729b67aa2b3 (patch)
treec3132be1ae8b36180f1efadd4d9e1500c275bd3a
parent5b6b2f606f01024df958b434e76204fe12c3c602 (diff)
Remove unused fn
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--mqtt-tester/src/command.rs26
1 files changed, 0 insertions, 26 deletions
diff --git a/mqtt-tester/src/command.rs b/mqtt-tester/src/command.rs
index 9e01585..0358a98 100644
--- a/mqtt-tester/src/command.rs
+++ b/mqtt-tester/src/command.rs
@@ -116,32 +116,6 @@ impl Output {
Ok(buf)
}
- pub async fn wait_for_packet<'m, P>(&mut self, packet: P) -> miette::Result<()>
- where
- P: Into<MPacket<'m>>,
- {
- let mut buf = vec![];
- packet
- .into()
- .write_to(std::pin::Pin::new(&mut buf))
- .await
- .into_diagnostic()?;
-
- let bytes = self.wait_for(&buf).await?;
-
- match mqtt_format::v3::packet::mpacket(&bytes) {
- Ok((_, packet)) => self
- .attached_invariants
- .iter()
- .flat_map(|inv| inv.test_invariant(&packet))
- .collect::<Result<Vec<_>, _>>()
- .map(|_| ()),
- Err(e) => {
- miette::bail!("Failed to parse as MQTT packet: {}", e)
- }
- }
- }
-
pub async fn wait_and_check(&mut self, check: impl CheckBytes) -> miette::Result<()> {
match tokio::time::timeout(std::time::Duration::from_millis(100), async {
let mut buffer = BytesMut::new();