Fix building on Rust 1.61

This commit is contained in:
Quentin Gliech committed 2022-10-17 11:39:45 +02:00
1 parent d1a4262fd0
commit 16ffb42ec0
1 file changed
+7 -5
+7 -5
View File
@@ -51,18 +51,20 @@ impl Display for ShutdownReason {
}
}
#[derive(Default)]
pub enum ShutdownStreamState {
#[default]
Waiting,
Graceful {
sleep: Option<Pin<Box<Sleep>>>,
},
Graceful { sleep: Option<Pin<Box<Sleep>>> },
Done,
}
impl Default for ShutdownStreamState {
fn default() -> Self {
Self::Waiting
}
}
impl ShutdownStreamState {
fn is_graceful(&self) -> bool {
matches!(self, Self::Graceful { .. })