Skip to content

Commit 72683bf

Browse files
Merge #707
707: Fix clippy r=brunoocasali a=curquiza <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Refactor - Public query builder APIs now use explicit lifetimes, improving type clarity when borrowing clients or indexes. - No runtime behavior changes; only type signatures are adjusted. - Chores - Harmonized return types across search, document, and index-related builders to consistently reflect lifetimes. - Notes - This may require minor source updates for projects relying on inferred lifetimes in return types. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: curquiza <[email protected]>
2 parents c029adb + 5aa3bb0 commit 72683bf

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl<Http: HttpClient> Client<Http> {
202202
///
203203
/// [1]: https://www.meilisearch.com/docs/learn/multi_search/multi_search_vs_federated_search#what-is-federated-search
204204
#[must_use]
205-
pub fn multi_search(&self) -> MultiSearchQuery<Http> {
205+
pub fn multi_search(&self) -> MultiSearchQuery<'_, '_, Http> {
206206
MultiSearchQuery::new(self)
207207
}
208208

src/documents.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub struct DocumentQuery<'a, Http: HttpClient> {
8686

8787
impl<'a, Http: HttpClient> DocumentQuery<'a, Http> {
8888
#[must_use]
89-
pub fn new(index: &Index<Http>) -> DocumentQuery<Http> {
89+
pub fn new(index: &Index<Http>) -> DocumentQuery<'_, Http> {
9090
DocumentQuery {
9191
index,
9292
fields: None,
@@ -200,7 +200,7 @@ pub struct DocumentsQuery<'a, Http: HttpClient> {
200200

201201
impl<'a, Http: HttpClient> DocumentsQuery<'a, Http> {
202202
#[must_use]
203-
pub fn new(index: &Index<Http>) -> DocumentsQuery<Http> {
203+
pub fn new(index: &Index<Http>) -> DocumentsQuery<'_, Http> {
204204
DocumentsQuery {
205205
index,
206206
offset: None,
@@ -332,7 +332,7 @@ pub struct DocumentDeletionQuery<'a, Http: HttpClient> {
332332

333333
impl<'a, Http: HttpClient> DocumentDeletionQuery<'a, Http> {
334334
#[must_use]
335-
pub fn new(index: &Index<Http>) -> DocumentDeletionQuery<Http> {
335+
pub fn new(index: &Index<Http>) -> DocumentDeletionQuery<'_, Http> {
336336
DocumentDeletionQuery {
337337
index,
338338
filter: None,

src/indexes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl<Http: HttpClient> Index<Http> {
276276
/// # });
277277
/// ```
278278
#[must_use]
279-
pub fn search(&self) -> SearchQuery<Http> {
279+
pub fn search(&self) -> SearchQuery<'_, Http> {
280280
SearchQuery::new(self)
281281
}
282282

@@ -1777,7 +1777,7 @@ pub struct IndexUpdater<'a, Http: HttpClient> {
17771777
}
17781778

17791779
impl<'a, Http: HttpClient> IndexUpdater<'a, Http> {
1780-
pub fn new(uid: impl AsRef<str>, client: &Client<Http>) -> IndexUpdater<Http> {
1780+
pub fn new(uid: impl AsRef<str>, client: &Client<Http>) -> IndexUpdater<'_, Http> {
17811781
IndexUpdater {
17821782
client,
17831783
primary_key: None,
@@ -1976,7 +1976,7 @@ pub struct IndexesQuery<'a, Http: HttpClient> {
19761976

19771977
impl<'a, Http: HttpClient> IndexesQuery<'a, Http> {
19781978
#[must_use]
1979-
pub fn new(client: &Client<Http>) -> IndexesQuery<Http> {
1979+
pub fn new(client: &Client<Http>) -> IndexesQuery<'_, Http> {
19801980
IndexesQuery {
19811981
client,
19821982
offset: None,

0 commit comments

Comments
 (0)