Compare commits

..

No commits in common. "864e386d9e080e69f04e46da12fa77b9fc36209a" and "cf416e6d0a626ebc1893741b216d61a1e8502208" 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>>>,