mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Remove use of unstable feature (duration_zero)
The feature has been stabilized in 1.53.
This commit is contained in:
parent
a5192a9ecb
commit
00093664c7
1 changed files with 4 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue