Panic if dropped before script is complete
First, this crate's been really useful :) Writing a tool with a lot of serial port transactions and this has been a godsend.
However, I've been peppering calls in every test to a helper function I wrote, is_script_complete, to check that all the actions of the mock have been executed. Since the point is that the actions have to follow the script otherwise a panic is generated, I think it'd be more useful for the mock to panic if it's Dropped with actions still pending.
I'd be happy to implement this if it seems like it would be useful. I'd assume it would have to be behind some kind of configuration option, to avoid breaking existing tests which rely on it not causing a panic. LMK if this seems useful and if I should go ahead.
We are moving the contents of this crate into tokio-test (https://github.com/tokio-rs/tokio/pull/1290).
Maybe we can move the discussion there? If you are using mock-io in a synchronous context, then we probably should discuss the path forward.
Yeah - synchronous context. Running with default-features = false, features = [] so it's just the most basic functionality the crate gives that I'm using.