wip: logs broken

This commit is contained in:
Jack Wills
2022-07-22 21:23:09 +00:00
parent db7aa8dceb
commit 8cdfa2d6be
3 changed files with 13 additions and 26 deletions
+9 -8
View File
@@ -117,15 +117,16 @@ impl State {
_ => Color::Red,
}
}
pub fn as_text(&self) -> &'static str {
// Dirty way to create order for the state, rather than impl Ord
pub fn order(&self) -> &'static str {
match self {
Self::Dead => "dead",
Self::Exited => "exited",
Self::Paused => "paused",
Self::Removing => "removing",
Self::Restarting => "restarting",
Self::Running => "running",
Self::Unknown => "unknown",
Self::Running => "a",
Self::Paused => "b",
Self::Restarting => "c",
Self::Removing => "d",
Self::Exited => "e",
Self::Dead => "f",
Self::Unknown => "g",
}
}
}