Skip to content

LNX-169: Add custom sort collector #212

LNX-169: Add custom sort collector

LNX-169: Add custom sort collector #212

GitHub Actions / clippy succeeded Jan 18, 2025 in 1s

clippy

74 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 74
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 125 in lnx-fs/src/metastore/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

deref which would be done by auto-deref

warning: deref which would be done by auto-deref
   --> lnx-fs/src/metastore/mod.rs:125:34
    |
125 |             .filter(|entry| pred(&*entry))
    |                                  ^^^^^^^ help: try: `entry`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
    = note: `#[warn(clippy::explicit_auto_deref)]` on by default

Check warning on line 125 in lnx-fs/src/metastore/mod.rs

See this annotation in the file changed.

@github-actions 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
   --> lnx-fs/src/metastore/mod.rs:125:34
    |
125 |             .filter(|entry| pred(&*entry))
    |                                  ^^^^^^^ help: change this to: `*entry`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 125 in lnx-fs/src/metastore/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

deref on an immutable reference

warning: deref on an immutable reference
   --> lnx-fs/src/metastore/mod.rs:125:34
    |
125 |             .filter(|entry| pred(&*entry))
    |                                  ^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
    = note: `#[warn(clippy::borrow_deref_ref)]` on by default
help: if you would like to reborrow, try removing `&*`
    |
125 |             .filter(|entry| pred(entry))
    |                                  ~~~~~
help: if you would like to deref, try using `&**`
    |
125 |             .filter(|entry| pred(&**entry))
    |                                  ~~~~~~~~

Check warning on line 14 in lnx-fs/src/metastore/mutate.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> lnx-fs/src/metastore/mutate.rs:14:6
   |
14 | impl<'a> BulkMetastoreModifyOperation<'a> {
   |      ^^                               ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
14 - impl<'a> BulkMetastoreModifyOperation<'a> {
14 + impl BulkMetastoreModifyOperation<'_> {
   |

Check warning on line 197 in lnx-tantivy/src/collectors/top_docs/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

associated function `new` is never used

warning: associated function `new` is never used
   --> lnx-tantivy/src/collectors/top_docs/mod.rs:197:8
    |
196 | impl<T: PartialOrd + Clone> TopSegmentCollector<T> {
    | -------------------------------------------------- associated function in this implementation
197 |     fn new(segment_ord: SegmentOrdinal, limit: usize) -> TopSegmentCollector<T> {
    |        ^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 462 in lnx-tantivy/src/collectors/top_docs/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `score`

warning: unused variable: `score`
   --> lnx-tantivy/src/collectors/top_docs/mod.rs:462:14
    |
462 |         for (score, doc) in expected_docs {
    |              ^^^^^ help: if this is intentional, prefix it with an underscore: `_score`
    |
    = note: `#[warn(unused_variables)]` on by default

Check warning on line 1027 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
    --> lnx-models/src/query.rs:1027:9
     |
1027 |         self,
     |         ^^^^
     |
     = help: consider choosing a less ambiguous name
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 986 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
   --> lnx-models/src/query.rs:986:9
    |
986 |         self,
    |         ^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 822 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
   --> lnx-models/src/query.rs:822:9
    |
822 |         self,
    |         ^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 21 in lnx-tantivy/src/directory/vfs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `debug`

warning: unused import: `debug`
  --> lnx-tantivy/src/directory/vfs.rs:21:15
   |
21 | use tracing::{debug, warn};
   |               ^^^^^

Check warning on line 320 in lnx-tantivy/src/collectors/top_docs/custom_sort.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::collectors::TopDocs`

warning: unused import: `crate::collectors::TopDocs`
   --> lnx-tantivy/src/collectors/top_docs/custom_sort.rs:320:9
    |
320 |     use crate::collectors::TopDocs;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 315 in lnx-tantivy/src/collectors/top_docs/custom_sort.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `QueryParser`

warning: unused import: `QueryParser`
   --> lnx-tantivy/src/collectors/top_docs/custom_sort.rs:315:36
    |
315 |     use tantivy::query::{AllQuery, QueryParser};
    |                                    ^^^^^^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

Check warning on line 362 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
   --> lnx-models/src/query.rs:362:9
    |
362 |         mut self,
    |         ^^^^^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 4 in lnx-tantivy/tests/test_indexing_merges.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `tantivy::indexer::NoMergePolicy`

warning: unused import: `tantivy::indexer::NoMergePolicy`
 --> lnx-tantivy/tests/test_indexing_merges.rs:4:5
  |
4 | use tantivy::indexer::NoMergePolicy;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 333 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
   --> lnx-models/src/query.rs:333:9
    |
333 |         self,
    |         ^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 296 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
   --> lnx-models/src/query.rs:296:9
    |
296 |         self,
    |         ^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 249 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
   --> lnx-models/src/query.rs:249:9
    |
249 |         self,
    |         ^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 221 in lnx-doc/src/borrowed_value.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::string::String`

warning: useless conversion to the same type: `std::string::String`
   --> lnx-doc/src/borrowed_value.rs:221:42
    |
221 |         Ok(BorrowedValue::Str(Cow::Owned(v.into())))
    |                                          ^^^^^^^^ help: consider removing `.into()`: `v`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `#[warn(clippy::useless_conversion)]` on by default

Check warning on line 209 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
   --> lnx-models/src/query.rs:209:9
    |
209 |         self,
    |         ^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention

Check warning on line 334 in lnx-doc/src/borrowed_value.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `0` is never read

warning: field `0` is never read
   --> lnx-doc/src/borrowed_value.rs:334:28
    |
334 | struct CowBytesWrapper<'a>(Cow<'a, [u8]>);
    |        ---------------     ^^^^^^^^^^^^^
    |        |
    |        field in this struct
    |
    = help: consider removing this field
    = note: `#[warn(dead_code)]` on by default

Check warning on line 156 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference

warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
   --> lnx-models/src/query.rs:156:9
    |
156 |         self,
    |         ^^^^
    |
    = help: consider choosing a less ambiguous name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
    = note: `#[warn(clippy::wrong_self_convention)]` on by default

Check warning on line 1149 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `to_collector_predicate` is never used

warning: method `to_collector_predicate` is never used
    --> lnx-models/src/query.rs:1149:8
     |
1148 | impl OneOrManySortBy {
     | -------------------- method in this implementation
1149 |     fn to_collector_predicate(&self) {}
     |        ^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 1105 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `to_tantivy_query` is never used

warning: method `to_tantivy_query` is never used
    --> lnx-models/src/query.rs:1105:8
     |
1104 | impl GteExpr {
     | ------------ method in this implementation
1105 |     fn to_tantivy_query(
     |        ^^^^^^^^^^^^^^^^

Check warning on line 1065 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `to_tantivy_query` is never used

warning: method `to_tantivy_query` is never used
    --> lnx-models/src/query.rs:1065:8
     |
1064 | impl GtExpr {
     | ----------- method in this implementation
1065 |     fn to_tantivy_query(
     |        ^^^^^^^^^^^^^^^^

Check warning on line 1026 in lnx-models/src/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `to_tantivy_query` is never used

warning: method `to_tantivy_query` is never used
    --> lnx-models/src/query.rs:1026:8
     |
1025 | impl LteExpr {
     | ------------ method in this implementation
1026 |     fn to_tantivy_query(
     |        ^^^^^^^^^^^^^^^^