From 16ffb42ec0cf2c7877d7c5c741bd2d815ed126cf Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Mon, 17 Oct 2022 10:31:54 +0200 Subject: [PATCH] Fix building on Rust 1.61 --- crates/listener/src/shutdown.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/listener/src/shutdown.rs b/crates/listener/src/shutdown.rs index cf7eb227..a691d591 100644 --- a/crates/listener/src/shutdown.rs +++ b/crates/listener/src/shutdown.rs @@ -51,18 +51,20 @@ impl Display for ShutdownReason { } } -#[derive(Default)] pub enum ShutdownStreamState { - #[default] Waiting, - Graceful { - sleep: Option>>, - }, + Graceful { sleep: Option>> }, Done, } +impl Default for ShutdownStreamState { + fn default() -> Self { + Self::Waiting + } +} + impl ShutdownStreamState { fn is_graceful(&self) -> bool { matches!(self, Self::Graceful { .. })