feat: add version to .centroids file - #186
clippy
95 warnings
Details
Results
| Message level | Amount |
|---|---|
| Internal compiler error | 0 |
| Error | 0 |
| Warning | 95 |
| Note | 0 |
| Help | 0 |
Versions
- rustc 1.97.1 (8bab26f4f 2026-07-14)
- cargo 1.97.1 (c980f4866 2026-06-30)
- clippy 0.1.97 (8bab26f4f6 2026-07-14)
Annotations
Check warning on line 800 in src/vector/tests.rs
github-actions / clippy
manually reimplementing `div_ceil`
warning: manually reimplementing `div_ceil`
--> src/vector/tests.rs:800:9
|
800 | (ndocs + num_clusters - 1) / num_clusters
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `ndocs.div_ceil(num_clusters)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#manual_div_ceil
= note: `#[warn(clippy::manual_div_ceil)]` on by default
Check warning on line 109 in src/vector/ivf/plugin.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> src/vector/ivf/plugin.rs:109:25
|
109 | fn build_centroid_graph<'a>(
| ^^
110 | metric: Metric,
111 | centroids: &'a [f32],
| ^^
...
114 | ) -> crate::Result<RelativeNeighborhoodGraph<&'a [f32]>> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
109 ~ fn build_centroid_graph(
110 | metric: Metric,
111 ~ centroids: &[f32],
112 | dim: usize,
113 | ef: usize,
114 ~ ) -> crate::Result<RelativeNeighborhoodGraph<&[f32]>> {
|
Check warning on line 84 in src/vector/ivf/params.rs
github-actions / clippy
the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> src/vector/ivf/params.rs:84:12
|
84 | if !(self.max_probe_fraction > 0.0) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#neg_cmp_op_on_partial_ord
= note: `#[warn(clippy::neg_cmp_op_on_partial_ord)]` on by default
Check warning on line 295 in src/termdict/fst_termdict/streamer.rs
github-actions / clippy
method `next` can be confused for the standard trait method `std::iter::Iterator::next`
warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next`
--> src/termdict/fst_termdict/streamer.rs:288:5
|
288 | / pub fn next(&mut self) -> Option<(&[u8], &TermInfo, A::State)> {
289 | | if self.advance() {
290 | | let state = self.current_state.take().unwrap(); // always Some(_) after advance
291 | | Some((self.key(), self.value(), state))
... |
295 | | }
| |_____^
|
= help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
Check warning on line 209 in src/query/mod.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/query/mod.rs:209:43
|
209 | query.query_terms(text_field, &segment_reader, &mut |term, pos| {
| ^^^^^^^^^^^^^^^ help: change this to: `segment_reader`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#needless_borrow
Check warning on line 199 in src/query/mod.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/query/mod.rs:199:43
|
199 | query.query_terms(text_field, &segment_reader, &mut |term, pos| {
| ^^^^^^^^^^^^^^^ help: change this to: `segment_reader`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#needless_borrow
Check warning on line 191 in src/query/mod.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/query/mod.rs:191:43
|
191 | query.query_terms(text_field, &segment_reader, &mut |term, pos| {
| ^^^^^^^^^^^^^^^ help: change this to: `segment_reader`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#needless_borrow
Check warning on line 180 in src/query/mod.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/query/mod.rs:180:43
|
180 | query.query_terms(text_field, &segment_reader, &mut |term, pos| {
| ^^^^^^^^^^^^^^^ help: change this to: `segment_reader`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#needless_borrow
Check warning on line 172 in src/query/mod.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/query/mod.rs:172:43
|
172 | query.query_terms(text_field, &segment_reader, &mut |term, pos| {
| ^^^^^^^^^^^^^^^ help: change this to: `segment_reader`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#needless_borrow
Check warning on line 580 in src/query/term_set_query/term_set_weight.rs
github-actions / clippy
items after a test module
warning: items after a test module
--> src/query/term_set_query/term_set_weight.rs:580:1
|
580 | mod tests {
| ^^^^^^^^^
...
792 | / impl<T: Copy + Eq + std::hash::Hash + PartialOrd + std::fmt::Debug + Send + Sync + 'static> DocSet
793 | | for TermSetDocSet<T>
| |________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#items_after_test_module
= note: `#[warn(clippy::items_after_test_module)]` on by default
= help: move the items to before the test module was defined
Check warning on line 25 in src/query/term_set_query/term_set_weight.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/query/term_set_query/term_set_weight.rs:25:5
|
25 | //! five variants including `Automaton` for non-fast indexed fields.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#doc_lazy_continuation
help: indent this line
|
25 | //! five variants including `Automaton` for non-fast indexed fields.
| ++
Check warning on line 23 in src/query/term_set_query/term_set_weight.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/query/term_set_query/term_set_weight.rs:23:5
|
23 | //! construction. The per-segment scorer opens the column only when
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#doc_lazy_continuation
help: indent this line
|
23 | //! construction. The per-segment scorer opens the column only when
| ++
Check warning on line 22 in src/query/term_set_query/term_set_weight.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/query/term_set_query/term_set_weight.rs:22:5
|
22 | //! Automaton), and a `fast_strategies_available` flag set at
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#doc_lazy_continuation
help: indent this line
|
22 | //! Automaton), and a `fast_strategies_available` flag set at
| ++
Check warning on line 21 in src/query/term_set_query/term_set_weight.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/query/term_set_query/term_set_weight.rs:21:5
|
21 | //! Linear + Bitset on numeric-fast), a pre-built FST (consumed by
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
21 | //! Linear + Bitset on numeric-fast), a pre-built FST (consumed by
| ++
Check warning on line 899 in src/query/term_set_query/term_set_strategy.rs
github-actions / clippy
returning the result of a `let` binding from a block
warning: returning the result of a `let` binding from a block
--> src/query/term_set_query/term_set_strategy.rs:899:9
|
887 | / let strat = select_strategy(
888 | | &reader,
889 | | &column,
890 | | PlannerInputs {
... |
897 | | &TermSetStrategyConfig::default(),
898 | | );
| |__________- unnecessary `let` binding
899 | strat
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
887 ~
888 ~ select_strategy(
889 + &reader,
890 + &column,
891 + PlannerInputs {
892 + field_name: &name,
893 + candidate_size: None,
894 + avg_docs_per_term: Some(d),
895 + fast_available: true,
896 + },
897 + &term_set(0..k as u64),
898 + &TermSetStrategyConfig::default(),
899 + )
|
Check warning on line 1979 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
using `clone` on type `Bound<u64>` which implements the `Copy` trait
warning: using `clone` on type `Bound<u64>` which implements the `Copy` trait
--> src/query/range_query/range_query_fastfield.rs:1979:68
|
1979 | let actual = count_range(&index, field, lower.clone(), upper.clone());
| ^^^^^^^^^^^^^ help: try dereferencing it: `*upper`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#clone_on_copy
Check warning on line 1979 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
using `clone` on type `Bound<u64>` which implements the `Copy` trait
warning: using `clone` on type `Bound<u64>` which implements the `Copy` trait
--> src/query/range_query/range_query_fastfield.rs:1979:53
|
1979 | let actual = count_range(&index, field, lower.clone(), upper.clone());
| ^^^^^^^^^^^^^ help: try dereferencing it: `*lower`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
Check warning on line 1797 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
redundant reference in `format!` argument
warning: redundant reference in `format!` argument
--> src/query/range_query/range_query_fastfield.rs:1797:17
|
1797 | &id_filter
| ^^^^^^^^^^ help: remove the redundant `&`: `id_filter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
Check warning on line 1788 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
redundant reference in `format!` argument
warning: redundant reference in `format!` argument
--> src/query/range_query/range_query_fastfield.rs:1788:17
|
1788 | &id_filter
| ^^^^^^^^^^ help: remove the redundant `&`: `id_filter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
Check warning on line 1539 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
redundant reference in `format!` argument
warning: redundant reference in `format!` argument
--> src/query/range_query/range_query_fastfield.rs:1539:17
|
1539 | &id_filter
| ^^^^^^^^^^ help: remove the redundant `&`: `id_filter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
Check warning on line 1532 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
redundant reference in `format!` argument
warning: redundant reference in `format!` argument
--> src/query/range_query/range_query_fastfield.rs:1532:17
|
1532 | &id_filter
| ^^^^^^^^^^ help: remove the redundant `&`: `id_filter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
Check warning on line 1525 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
redundant reference in `format!` argument
warning: redundant reference in `format!` argument
--> src/query/range_query/range_query_fastfield.rs:1525:17
|
1525 | &id_filter
| ^^^^^^^^^^ help: remove the redundant `&`: `id_filter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
Check warning on line 1515 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
redundant reference in `format!` argument
warning: redundant reference in `format!` argument
--> src/query/range_query/range_query_fastfield.rs:1515:17
|
1515 | &id_filter
| ^^^^^^^^^^ help: remove the redundant `&`: `id_filter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
Check warning on line 1508 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
redundant reference in `format!` argument
warning: redundant reference in `format!` argument
--> src/query/range_query/range_query_fastfield.rs:1508:17
|
1508 | &id_filter
| ^^^^^^^^^^ help: remove the redundant `&`: `id_filter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
Check warning on line 1501 in src/query/range_query/range_query_fastfield.rs
github-actions / clippy
redundant reference in `format!` argument
warning: redundant reference in `format!` argument
--> src/query/range_query/range_query_fastfield.rs:1501:17
|
1501 | &id_filter
| ^^^^^^^^^^ help: remove the redundant `&`: `id_filter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting