make clippy happy

This commit is contained in:
Tamo 2024-12-16 15:52:47 +01:00
parent 34254b42b6
commit 0c04cd1d9f
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69
2 changed files with 22 additions and 24 deletions

View File

@ -356,3 +356,4 @@ pub fn search_kind(
(_, None, Some(_)) => Err(MeilisearchHttpError::MissingSearchHybrid.into()),
}
}

View File

@ -1,4 +1,3 @@
pub mod search_test {
use crate::routes::indexes::search::fix_sort_query_parameters;
#[test]
@ -7,9 +6,8 @@ pub mod search_test {
assert_eq!(sort, vec!["_geoPoint(12,13):asc".to_string()]);
let sort = fix_sort_query_parameters("doggo:asc,_geoPoint(12.45,13.56):desc");
assert_eq!(sort, vec!["doggo:asc".to_string(), "_geoPoint(12.45,13.56):desc".to_string(),]);
let sort = fix_sort_query_parameters(
"doggo:asc , _geoPoint(12.45, 13.56, 2590352):desc , catto:desc",
);
let sort =
fix_sort_query_parameters("doggo:asc , _geoPoint(12.45, 13.56, 2590352):desc , catto:desc");
assert_eq!(
sort,
vec![
@ -22,4 +20,3 @@ pub mod search_test {
// This is ugly but eh, I don't want to write a full parser just for this unused route
assert_eq!(sort, vec!["doggo:asc".to_string(), "_geoPoint(1,2),catto:desc".to_string(),]);
}
}