model/enums: derive Ord for ReleaseType to simplify comparisons
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Id47e4e40e015b1212815addbbca238456a6a6964
This commit is contained in:
parent
bc74c24dd5
commit
c6d60b4459
1 changed files with 5 additions and 1 deletions
|
|
@ -103,9 +103,13 @@ impl std::fmt::Display for UpdateStrategy {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[derive(
|
||||
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize,
|
||||
)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum ReleaseType {
|
||||
// Order matters: Release < Beta < Alpha for sorting (we want Release first)
|
||||
// But we want reverse order, so we'll use reverse() or handle in comparison
|
||||
Release,
|
||||
Beta,
|
||||
Alpha,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue