Closed coolreader18 closed 3 years ago
Hello @coolreader18 ! Thanks for your contribution again.
I like that sleeper direction, it's better for testing purposes too.
Let me merge your PR but I won't issue a release right away. This will deserve a 0.3 version and I might bundle in some more changes into a release (mainly more deps updates and simplifications).
Alright, sounds good!
I realized that the conditional compilation for
fn sleep() -> Sleep
inasync.rs
could be represented as a trait, so I did this. I'm not too sure about the names.This allows for accessing both the async_std and tokio versions of the retry functions if so desired, and also lets you implement your own sleeper if you use some other runtime.