mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
Unify candidate ranking pipeline
This commit is contained in:
12
crates/aether-scheduler-core/src/ranking/format.rs
Normal file
12
crates/aether-scheduler-core/src/ranking/format.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
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))
|
||||
}
|
||||
Reference in New Issue
Block a user