Bump serde-cs to simplify our usage of the star_or function

This commit is contained in:
Kerollmops 2022-06-06 10:17:33 +02:00
parent 64b5b2e1f8
commit 277a0a7967
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
5 changed files with 13 additions and 32 deletions

View file

@ -99,7 +99,7 @@ pub async fn get_document(
let index = path.index_uid.clone();
let id = path.document_id.clone();
let GetDocument { fields } = params.into_inner();
let attributes_to_retrieve = fields.map(CS::into_inner).and_then(fold_star_or);
let attributes_to_retrieve = fields.and_then(fold_star_or);
let document = meilisearch
.document(index, id, attributes_to_retrieve)
@ -143,7 +143,7 @@ pub async fn get_all_documents(
offset,
fields,
} = params.into_inner();
let attributes_to_retrieve = fields.map(CS::into_inner).and_then(fold_star_or);
let attributes_to_retrieve = fields.and_then(fold_star_or);
let (total, documents) = meilisearch
.documents(path.into_inner(), offset, limit, attributes_to_retrieve)