Previously, despite what the documentation says ("inclusively between the low and high"), the wait time was generated with the upper bound exclusive. This lead to the problem that a constant wait time (the same upper and lower limit) would panic because there is no valid value for rand to return.
thread 'tokio-runtime-worker' panicked at 'cannot sample empty range', [left out for privacy]\rand-0.8.5\src\rng.rs:134:9
This PR fixes this by this by using a closed range to generate the wait time. Additionally, a example in the documentation now reflects this usecase.
Previously, despite what the documentation says ("inclusively between the low and high"), the wait time was generated with the upper bound exclusive. This lead to the problem that a constant wait time (the same upper and lower limit) would panic because there is no valid value for rand to return.
thread 'tokio-runtime-worker' panicked at 'cannot sample empty range', [left out for privacy]\rand-0.8.5\src\rng.rs:134:9
This PR fixes this by this by using a closed range to generate the wait time. Additionally, a example in the documentation now reflects this usecase.