use async_trait::async_trait;
use futures::StreamExt;
use streamline::{Progress, RevertProgress, State, Streamline};
use tokio::runtime::Runtime;
#[test]
fn cancels() {
#[derive(Debug)]
struct Context;
#[derive(Clone, Debug, PartialEq)]
enum MyState {
Start,
Middle(String),
End(String),
}
#[derive(Debug, PartialEq)]
struct MyError(&'static str);
#[async_trait(?Send)]
impl State for MyState {
type Context = Context;
type Error = MyError;
async fn next(
&self,
_context: Option<&mut Self::Context>,
) -> Result