Compare commits

...

2 Commits

Author SHA1 Message Date
John Nunley 952cb96a75
Merge 79d6b07f40 into 2aa2aece0f 2024-04-21 21:51:51 +00:00
John Nunley 79d6b07f40
ci: Remove cov_assert_eq
Signed-off-by: John Nunley <dev@notgull.net>
2024-04-21 14:51:26 -07:00
1 changed files with 1 additions and 19 deletions

View File

@ -59,24 +59,6 @@ use sync::atomic::AtomicUsize;
use sync::atomic::Ordering::SeqCst;
use sync::{Condvar, Mutex};
#[cfg(coverage)]
#[coverage(off)]
fn cov_assert(x: bool, msg: &str) {
if !x {
panic!("{}", msg);
}
}
#[cfg(not(coverage))]
use assert_eq as cov_assert_eq;
#[cfg(coverage)]
macro_rules! cov_assert_eq {
($left:expr, $right:expr, $msg:literal) => {{
cov_assert($left == $right, $msg)
}};
}
/// Creates a parker and an associated unparker.
///
/// # Examples
@ -372,7 +354,7 @@ impl Inner {
// with that `unpark` to observe any writes it made before the call to `unpark`. To
// do that we must read from the write it made to `state`.
let old = self.state.swap(EMPTY, SeqCst);
cov_assert_eq!(old, NOTIFIED, "park state changed unexpectedly");
assert_eq!(old, NOTIFIED, "park state changed unexpectedly");
return true;
}
Err(n) => panic!("inconsistent park_timeout state: {}", n),