From 368f9626a2c18a1a2d7732651e5ec729b67aa2b3 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 13 Jan 2023 10:16:58 +0100 Subject: Remove unused fn Signed-off-by: Matthias Beyer --- mqtt-tester/src/command.rs | 26 -------------------------- 1 file changed, 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>, - { - 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::, _>>() - .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(); -- cgit v1.2.3