Fix sort id

This commit is contained in:
Louis Dureuil 2023-06-06 18:21:31 +02:00
parent 45636d315c
commit 0c40ef6911
No known key found for this signature in database

View File

@ -67,7 +67,7 @@ impl<'ctx, Query> Sort<'ctx, Query> {
impl<'ctx, Query: RankingRuleQueryTrait> RankingRule<'ctx, Query> for Sort<'ctx, Query> { impl<'ctx, Query: RankingRuleQueryTrait> RankingRule<'ctx, Query> for Sort<'ctx, Query> {
fn id(&self) -> String { fn id(&self) -> String {
let Self { field_name, is_ascending, .. } = self; let Self { field_name, is_ascending, .. } = self;
format!("{field_name}:{}", if *is_ascending { "asc" } else { "desc " }) format!("{field_name}:{}", if *is_ascending { "asc" } else { "desc" })
} }
fn start_iteration( fn start_iteration(
&mut self, &mut self,