You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-01 20:26:56 +03:00
Fix building on Rust 1.61
This commit is contained in:
@ -51,18 +51,20 @@ impl Display for ShutdownReason {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
|
||||||
pub enum ShutdownStreamState {
|
pub enum ShutdownStreamState {
|
||||||
#[default]
|
|
||||||
Waiting,
|
Waiting,
|
||||||
|
|
||||||
Graceful {
|
Graceful { sleep: Option<Pin<Box<Sleep>>> },
|
||||||
sleep: Option<Pin<Box<Sleep>>>,
|
|
||||||
},
|
|
||||||
|
|
||||||
Done,
|
Done,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for ShutdownStreamState {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::Waiting
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl ShutdownStreamState {
|
impl ShutdownStreamState {
|
||||||
fn is_graceful(&self) -> bool {
|
fn is_graceful(&self) -> bool {
|
||||||
matches!(self, Self::Graceful { .. })
|
matches!(self, Self::Graceful { .. })
|
||||||
|
Reference in New Issue
Block a user