From 82c68fc8248182de73cf40cd6993573e6aeaf665 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 3 May 2021 16:08:38 +0100 Subject: [PATCH] packetframe: Add some not miri annotations warning: function is never used: `expect_good` --> src/packetframe.rs:521:6 | 521 | fn expect_good(rd: &mut FrameReader, expected: &[u8]) { | ^^^^^^^^^^^ Weirdly, not always. Only on certain rebuilds ? Whatever. Signed-off-by: Ian Jackson --- src/packetframe.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/packetframe.rs b/src/packetframe.rs index 2fa958ee..46aef0b6 100644 --- a/src/packetframe.rs +++ b/src/packetframe.rs @@ -518,6 +518,7 @@ fn write_test(){ expect_boom(&mut rd); // utilitiesfor reading the whole input, collecting into vecs + #[cfg(not(miri))] fn expect_good(rd: &mut FrameReader, expected: &[u8]) { let mut buf = vec![]; let mut frame = rd.new_frame().unwrap().unwrap(); @@ -525,6 +526,7 @@ fn write_test(){ assert_eq!(&*buf ,expected); dbgc!(str::from_utf8(&buf).unwrap()); } + #[cfg(not(miri))] fn expect_good_eof(rd: &mut FrameReader) { let frame = rd.new_frame().unwrap(); assert!(frame.is_none()); let frame = rd.new_frame().unwrap(); assert!(frame.is_none()); -- 2.30.2