Ensure chat messages are retrieved in order of id
This commit is contained in:
parent
7d94b0325f
commit
d09767a90b
2 changed files with 1 additions and 58 deletions
|
@ -9,13 +9,3 @@ pub mod projects;
|
|||
pub mod rooms;
|
||||
pub mod servers;
|
||||
pub mod users;
|
||||
|
||||
fn max_assign<T: Ord>(max: &mut Option<T>, val: T) {
|
||||
if let Some(max_val) = max {
|
||||
if val > *max_val {
|
||||
*max = Some(val);
|
||||
}
|
||||
} else {
|
||||
*max = Some(val);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue