We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca57b77 commit 1746336Copy full SHA for 1746336
src/stability/shutdown.rs
@@ -63,22 +63,14 @@ impl ShutdownReason {
63
}
64
65
/// Tracks shutdown experiences
66
+#[derive(Default)]
67
pub struct ShutdownTracker {
68
/// Last shutdown reason (if any)
69
pub last_reason: Option<ShutdownReason>,
70
/// Timestamp of last shutdown
71
pub last_timestamp: Option<u64>,
72
73
-impl Default for ShutdownTracker {
74
- fn default() -> Self {
75
- Self {
76
- last_reason: None,
77
- last_timestamp: None,
78
- }
79
80
-}
81
-
82
impl ShutdownTracker {
83
/// Record a shutdown event
84
pub fn record(&mut self, reason: ShutdownReason, timestamp: u64) {
0 commit comments