Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
fmassot committed Dec 21, 2023
1 parent a5deb1e commit 5595b4d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions quickwit/quickwit-search/src/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ fn validate_sort_field_types(
sort_field_is_datetime: &mut HashMap<String, bool>,
) -> crate::Result<()> {
for sort_field in sort_fields.iter() {
if let Some(sort_field_entry) = get_sort_by_field_entry(&sort_field.field_name, &schema)? {
if let Some(sort_field_entry) = get_sort_by_field_entry(&sort_field.field_name, schema)? {
validate_sort_by_field_type(
sort_field_entry,
sort_field.sort_datetime_format.is_some(),
Expand Down Expand Up @@ -1015,11 +1015,9 @@ fn convert_search_after_datetime_values(
if *sort_fields_is_datetime
.get(&sort_field.field_name)
.unwrap_or(&false)
&& sort_field.sort_datetime_format.is_none()
{
if sort_field.sort_datetime_format.is_none() {
sort_field.sort_datetime_format =
Some(SortDatetimeFormat::UnixTimestampMillis as i32);
}
sort_field.sort_datetime_format = Some(SortDatetimeFormat::UnixTimestampMillis as i32);
}
}
if let Some(partial_hit) = search_request.search_after.as_mut() {
Expand Down

0 comments on commit 5595b4d

Please sign in to comment.