Compare commits

..

No commits in common. "214780935b8001d1ad0490a61b7d0ff1130e3578" and "40b96c894ceb410b655df9a152d62a15fa1f6a93" 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>>>,