1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Fix building on Rust 1.61

This commit is contained in:
Quentin Gliech
2022-10-17 10:31:54 +02:00
parent d1a4262fd0
commit 16ffb42ec0

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 { .. })