Fixes bug that causes out-of-order sstable key. (#2445) #3456
Annotations
1 error and 8 warnings
coverage
Process completed with exit code 1.
|
transmute used without annotations:
src/schema/document/default_document.rs#L556
warning: transmute used without annotations
--> src/schema/document/default_document.rs:556:32
|
556 | unsafe { std::mem::transmute(num) }
| ^^^^^^^^^ help: consider adding missing annotations: `transmute::<u8, schema::document::default_document::ValueType>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
= note: `#[warn(clippy::missing_transmute_annotations)]` on by default
|
use of `default` to create a unit struct:
src/query/disjunction.rs#L195
warning: use of `default` to create a unit struct
--> src/query/disjunction.rs:195:34
|
195 | DoNothingCombiner::default(),
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
= note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
|
unneeded `return` statement:
src/query/disjunction.rs#L134
warning: unneeded `return` statement
--> src/query/disjunction.rs:134:9
|
134 | return self.current_doc;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
134 - return self.current_doc;
134 + self.current_doc
|
|
useless conversion to the same type: `std::vec::Vec<(tantivy_query_grammar::Occur, std::boxed::Box<dyn query::query::Query>)>`:
src/query/boolean_query/boolean_query.rs#L143
warning: useless conversion to the same type: `std::vec::Vec<(tantivy_query_grammar::Occur, std::boxed::Box<dyn query::query::Query>)>`
--> src/query/boolean_query/boolean_query.rs:143:26
|
143 | let subqueries = self
| __________________________^
144 | | .subqueries
145 | | .iter()
146 | | .map(|(occur, subquery)| (*occur, subquery.box_clone()))
147 | | .collect::<Vec<_>>()
148 | | .into();
| |___________________^
|
= 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
help: consider removing `.into()`
|
143 ~ let subqueries = self
144 + .subqueries
145 + .iter()
146 + .map(|(occur, subquery)| (*occur, subquery.box_clone()))
147 ~ .collect::<Vec<_>>();
|
|
useless use of `format!`:
src/indexer/mod.rs#L306
warning: useless use of `format!`
--> src/indexer/mod.rs:306:14
|
306 | (format!("{field_name_out_internal}"), Type::Str),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `field_name_out_internal.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
= note: `#[warn(clippy::useless_format)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/indexer/index_writer.rs#L1581
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/indexer/index_writer.rs:1581:41
|
1581 | existing_ids.remove(&id);
| ^^^ help: change this to: `id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/indexer/index_writer.rs#L1577
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/indexer/index_writer.rs:1577:41
|
1577 | existing_ids.remove(&id);
| ^^^ help: change this to: `id`
|
= 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
|
the `n @ _` pattern can be written as just `n`:
src/query/boolean_query/boolean_weight.rs#L173
warning: the `n @ _` pattern can be written as just `n`
--> src/query/boolean_query/boolean_weight.rs:173:17
|
173 | n @ _ if num_of_should_scorers == n => {
| ^^^^^ help: try: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
= note: `#[warn(clippy::redundant_pattern)]` on by default
|