Skip to content

Commit c62228c

Browse files
committed
Try to improve code coverage
1 parent 94e9140 commit c62228c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ jobs:
107107
# Generate separate reports for tests and doctests, and combine them.
108108
run: |
109109
set -euo pipefail
110-
cargo llvm-cov --no-report --all-features --workspace
111-
cargo llvm-cov --no-report --doc --all-features --workspace
110+
cargo llvm-cov --no-report --all-features --workspace --exclude 'meilisearch-test-macro'
111+
cargo llvm-cov --no-report --doc --all-features --workspace --exclude 'meilisearch-test-macro'
112112
cargo llvm-cov report --doctests --codecov --output-path codecov.json
113113
- name: Upload coverage reports to Codecov
114114
uses: codecov/codecov-action@v5

src/search.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -753,15 +753,15 @@ impl<'a, 'b, Http: HttpClient> MultiSearchQuery<'a, 'b, Http> {
753753

754754
pub fn with_search_query_and_weight(
755755
&mut self,
756-
mut search_query: SearchQuery<'b, Http>,
756+
search_query: SearchQuery<'b, Http>,
757757
weight: f32,
758758
) -> &mut MultiSearchQuery<'a, 'b, Http> {
759-
search_query.with_index_uid();
760-
search_query.federation_options = Some(QueryFederationOptions {
761-
weight: Some(weight),
762-
});
763-
self.queries.push(search_query);
764-
self
759+
self.with_search_query_and_options(
760+
search_query,
761+
QueryFederationOptions {
762+
weight: Some(weight),
763+
},
764+
)
765765
}
766766

767767
pub fn with_search_query_and_options(

0 commit comments

Comments
 (0)