message: derive Ord for MessageState

This commit is contained in:
link2xt
2023-01-06 02:12:36 +00:00
parent f4c674fa98
commit 6e40fd8000

View File

@@ -586,7 +586,7 @@ impl Message {
}
pub fn is_sent(&self) -> bool {
self.state as i32 >= MessageState::OutDelivered as i32
self.state >= MessageState::OutDelivered
}
pub fn is_forwarded(&self) -> bool {
@@ -899,6 +899,8 @@ impl Message {
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
FromPrimitive,
ToPrimitive,
ToSql,