mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
cargo fmt
This commit is contained in:
parent
0d71c80ba6
commit
b297b5deb0
3 changed files with 25 additions and 6 deletions
|
@ -92,7 +92,10 @@ impl FromStr for Member {
|
|||
Ok(Member::Geo([lat, lng]))
|
||||
}
|
||||
None => {
|
||||
if is_reserved_keyword(text) || text.starts_with("_geoRadius(") || text.starts_with("_geoBoundingBox(") {
|
||||
if is_reserved_keyword(text)
|
||||
|| text.starts_with("_geoRadius(")
|
||||
|| text.starts_with("_geoBoundingBox(")
|
||||
{
|
||||
return Err(AscDescError::ReservedKeyword { name: text.to_string() })?;
|
||||
}
|
||||
Ok(Member::Field(text.to_string()))
|
||||
|
|
|
@ -160,7 +160,10 @@ mod tests {
|
|||
("_geoRadius:asc", ReservedNameForFilter { name: S("_geoRadius") }),
|
||||
("_geoRadius(42, 75, 59):asc", ReservedNameForFilter { name: S("_geoRadius") }),
|
||||
("_geoBoundingBox:asc", ReservedNameForFilter { name: S("_geoBoundingBox") }),
|
||||
("_geoBoundingBox((42, 75), (75, 59)):asc", ReservedNameForFilter { name: S("_geoBoundingBox") }),
|
||||
(
|
||||
"_geoBoundingBox((42, 75), (75, 59)):asc",
|
||||
ReservedNameForFilter { name: S("_geoBoundingBox") },
|
||||
),
|
||||
];
|
||||
|
||||
for (input, expected) in invalid_criteria {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue