Compare commits

..

No commits in common. "2d19d87c8c23b9fa378d39d27bb7b17b42d0566a" and "06826b2d6b5592822270c61e2358fd1e0580ef41" 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>>>,