mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
13 lines
336 B
Rust
13 lines
336 B
Rust
|
|
use std::cmp::Ordering;
|
||
|
|
|
||
|
|
use super::types::SchedulerRankableCandidate;
|
||
|
|
|
||
|
|
pub fn compare_format_state(
|
||
|
|
left: &SchedulerRankableCandidate,
|
||
|
|
right: &SchedulerRankableCandidate,
|
||
|
|
) -> Ordering {
|
||
|
|
left.demote_cross_format
|
||
|
|
.cmp(&right.demote_cross_format)
|
||
|
|
.then(left.format_preference.cmp(&right.format_preference))
|
||
|
|
}
|