Yeah; if I'd discovered stream::unfold
before async-stream
, I probably would have used that instead. I might still try to switch over so I can get rid of a dependency and get rustfmt
working for that section of the code; it doesn't seem to do much inside macro invocations.
I suspect that stream::poll_fn
could also be used in cases like this, but I haven't managed to figure out exactly how yet.