Function assert_cancel_safe

Source
pub fn assert_cancel_safe<F, T>(mk: impl FnMut() -> F, expected: &T)
where F: Future<Output = T>, T: Debug + PartialEq,
Expand description

Runtime-independent version: on each Poll::Pending, we just poll again. Suitable for pure/logical futures that don’t rely on timers, IO, or other external progress driven by an async runtime.