Compare commits

..

No commits in common. "3943944cd583bef966b2790bca2c9323f893b2fe" and "6c02ba824973ac751d1a9030f2888fde911a4d58" have entirely different histories.

1 changed files with 20 additions and 0 deletions

View File

@ -23,6 +23,26 @@ macro_rules! bilateral {
}};
}
macro_rules! assert_ready {
($e:expr) => {{
use core::task::Poll::*;
match $e {
Ready(v) => v,
Pending => panic!("pending"),
}
}};
($e:expr, $($msg:tt),+) => {{
use core::task::Poll::*;
match $e {
Ready(v) => v,
Pending => {
let msg = format_args!($($msg),+);
panic!("pending; {}", msg)
}
}
}};
}
#[derive(Debug)]
pub struct Bilateral {
pub calls: VecDeque<io::Result<Vec<u8>>>,