Remove use of unstable feature (duration_zero)

The feature has been stabilized in 1.53.
This commit is contained in:
Waffle 2021-05-19 10:19:41 +03:00
parent a5192a9ecb
commit 00093664c7

View file

@ -282,8 +282,11 @@ where
const MIN_SHUTDOWN_CHECK_TIMEOUT: Duration = Duration::from_secs(1);
// FIXME: replace this by just Duration::ZERO once 1.53 will be released
const DZERO: Duration = Duration::from_secs(0);
let shutdown_check_timeout =
update_listener.timeout_hint().unwrap_or(Duration::ZERO) + MIN_SHUTDOWN_CHECK_TIMEOUT;
update_listener.timeout_hint().unwrap_or(DZERO) + MIN_SHUTDOWN_CHECK_TIMEOUT;
if let Err(_) = self.shutdown_state.compare_exchange(IsntRunning, Running) {
panic!("Dispatching is already running");