Skip to content

fix: Add support for bool to the fast field TermSet implementation #179

fix: Add support for bool to the fast field TermSet implementation

fix: Add support for bool to the fast field TermSet implementation #179

Triggered via pull request October 16, 2025 19:15
Status Success
Total duration 2m 43s
Artifacts

test.yml

on: pull_request
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

144 warnings
this lint expectation is unfulfilled: src/indexer/stamper.rs#L120
warning: this lint expectation is unfulfilled --> src/indexer/stamper.rs:120:14 | 120 | #[expect(clippy::redundant_clone)] | ^^^^^^^^^^^^^^^^^^^^^^^
this lint expectation is unfulfilled: src/indexer/stamper.rs#L104
warning: this lint expectation is unfulfilled --> src/indexer/stamper.rs:104:14 | 104 | #[expect(clippy::redundant_clone)] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unfulfilled_lint_expectations)]` on by default
hiding a lifetime that's elided elsewhere is confusing: src/postings/serializer.rs#L74
warning: hiding a lifetime that's elided elsewhere is confusing --> src/postings/serializer.rs:74:9 | 74 | &mut self, | ^^^^^^^^^ the lifetime is elided here ... 78 | ) -> io::Result<FieldSerializer> { | --------------- the same lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 78 | ) -> io::Result<FieldSerializer<'_>> { | ++++
hiding a lifetime that's elided elsewhere is confusing: src/index/merge_optimized_inverted_index_reader.rs#L84
warning: hiding a lifetime that's elided elsewhere is confusing --> src/index/merge_optimized_inverted_index_reader.rs:84:9 | 84 | &self, | ^^^^^ the lifetime is elided here ... 87 | ) -> io::Result<BorrowedSegmentPostings> { | ----------------------- the same lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 87 | ) -> io::Result<BorrowedSegmentPostings<'_>> { | ++++
hiding a lifetime that's elided elsewhere is confusing: src/index/merge_optimized_inverted_index_reader.rs#L66
warning: hiding a lifetime that's elided elsewhere is confusing --> src/index/merge_optimized_inverted_index_reader.rs:66:9 | 66 | &self, | ^^^^^ the lifetime is elided here ... 69 | ) -> io::Result<BorrowedBlockSegmentPostings> { | ---------------------------- the same lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 69 | ) -> io::Result<BorrowedBlockSegmentPostings<'_>> { | ++++
hiding a lifetime that's elided elsewhere is confusing: src/indexer/index_writer.rs#L663
warning: hiding a lifetime that's elided elsewhere is confusing --> src/indexer/index_writer.rs:663:27 | 663 | pub fn prepare_commit(&mut self) -> crate::Result<PreparedCommit<D>> { | ^^^^^^^^^ ----------------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: use `'_` for type paths | 663 | pub fn prepare_commit(&mut self) -> crate::Result<PreparedCommit<'_, D>> { | +++
this can be `std::io::Error::other(_)`: src/termdict/mod.rs#L96
warning: this can be `std::io::Error::other(_)` --> src/termdict/mod.rs:96:24 | 96 | return Err(io::Error::new( | ________________________^ 97 | | io::ErrorKind::Other, 98 | | format!( 99 | | "Unsupported dictionary type, compiled tantivy with {CURRENT_TYPE:?}, but got \ 100 | | {dict_type:?}", 101 | | ), 102 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 96 ~ return Err(io::Error::other( 97 ~ format!( |
this can be `std::io::Error::other(_)`: src/termdict/mod.rs#L89
warning: this can be `std::io::Error::other(_)` --> src/termdict/mod.rs:89:13 | 89 | / io::Error::new( 90 | | io::ErrorKind::Other, 91 | | format!("Unsupported dictionary type, found {dict_type}"), 92 | | ) | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 89 ~ io::Error::other( 90 ~ format!("Unsupported dictionary type, found {dict_type}"), |
this can be `std::io::Error::other(_)`: src/termdict/fst_termdict/termdict.rs#L131
warning: this can be `std::io::Error::other(_)` --> src/termdict/fst_termdict/termdict.rs:131:24 | 131 | return Err(io::Error::new( | ________________________^ 132 | | io::ErrorKind::Other, 133 | | format!("Unsupported fst version, expected {version}, found {FST_VERSION}",), 134 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 131 ~ return Err(io::Error::other( 132 ~ format!("Unsupported fst version, expected {version}, found {FST_VERSION}",), |
this can be `std::io::Error::other(_)`: src/termdict/fst_termdict/termdict.rs#L16
warning: this can be `std::io::Error::other(_)` --> src/termdict/fst_termdict/termdict.rs:16:5 | 16 | io::Error::new(io::ErrorKind::Other, e) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 16 - io::Error::new(io::ErrorKind::Other, e) 16 + io::Error::other(e) |
method `next` can be confused for the standard trait method `std::iter::Iterator::next`: src/termdict/fst_termdict/streamer.rs#L288
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/master/index.html#should_implement_trait = note: `#[warn(clippy::should_implement_trait)]` on by default
this can be `std::io::Error::other(_)`: src/store/store_compressor.rs#L238
warning: this can be `std::io::Error::other(_)` --> src/store/store_compressor.rs:238:25 | 238 | .map_err(|_err| io::Error::new(io::ErrorKind::Other, "Compressing thread panicked."))? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 238 - .map_err(|_err| io::Error::new(io::ErrorKind::Other, "Compressing thread panicked."))? 238 + .map_err(|_err| io::Error::other("Compressing thread panicked."))? |
this can be `std::io::Error::other(_)`: src/store/store_compressor.rs#L235
warning: this can be `std::io::Error::other(_)` --> src/store/store_compressor.rs:235:24 | 235 | .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Thread already joined."))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 235 - .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Thread already joined."))?; 235 + .ok_or_else(|| io::Error::other("Thread already joined."))?; |
this can be `std::io::Error::other(_)`: src/store/store_compressor.rs#L218
warning: this can be `std::io::Error::other(_)` --> src/store/store_compressor.rs:218:24 | 218 | return Err(io::Error::new(io::ErrorKind::Other, "Unidentified error.")); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 218 - return Err(io::Error::new(io::ErrorKind::Other, "Unidentified error.")); 218 + return Err(io::Error::other("Unidentified error.")); |
this can be `std::io::Error::other(_)`: src/schema/document/se.rs#L279
warning: this can be `std::io::Error::other(_)` --> src/schema/document/se.rs:279:24 | 279 | return Err(io::Error::new( | ________________________^ 280 | | io::ErrorKind::Other, 281 | | format!( 282 | | "Unexpected number of entries written to serializer, expected {} entries, got \ ... | 285 | | ), 286 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 279 ~ return Err(io::Error::other( 280 ~ format!( |
this can be `std::io::Error::other(_)`: src/schema/document/se.rs#L218
warning: this can be `std::io::Error::other(_)` --> src/schema/document/se.rs:218:24 | 218 | return Err(io::Error::new( | ________________________^ 219 | | io::ErrorKind::Other, 220 | | format!( 221 | | "Unexpected number of entries written to serializer, expected {} entries, got \ ... | 224 | | ), 225 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 218 ~ return Err(io::Error::other( 219 ~ format!( |
this can be `std::io::Error::other(_)`: src/schema/document/se.rs#L58
warning: this can be `std::io::Error::other(_)` --> src/schema/document/se.rs:58:24 | 58 | return Err(io::Error::new( | ________________________^ 59 | | io::ErrorKind::Other, 60 | | format!( 61 | | "Unexpected number of entries written to serializer, expected \ 62 | | {num_field_values} entries, got {actual_length} entries", 63 | | ), 64 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 58 ~ return Err(io::Error::other( 59 ~ format!( |
item uses `packed` representation without ABI-qualification: src/schema/document/default_document.rs#L485
warning: item uses `packed` representation without ABI-qualification --> src/schema/document/default_document.rs:485:1 | 483 | #[repr(packed)] | ------ `packed` representation set here 484 | /// The value type and the address to its payload in the container. 485 | / struct ValueAddr { 486 | | type_id: ValueType, 487 | | /// This is the address to the value in the vec, except for bool and null, which are inlined 488 | | val_addr: Addr, 489 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicitly via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi
item uses `packed` representation without ABI-qualification: src/schema/document/default_document.rs#L21
warning: item uses `packed` representation without ABI-qualification --> src/schema/document/default_document.rs:21:1 | 18 | #[repr(packed)] | ------ `packed` representation set here ... 21 | / struct FieldValueAddr { 22 | | pub field: u16, 23 | | pub value_addr: ValueAddr, 24 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicitly via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi = note: `#[warn(clippy::repr_packed_without_abi)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/query/mod.rs#L129
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/query/mod.rs:129:43 | 129 | 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/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/query/mod.rs#L121
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/query/mod.rs:121:43 | 121 | 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/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/query/mod.rs#L113
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/query/mod.rs:113:43 | 113 | 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/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/query/mod.rs#L102
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/query/mod.rs:102:43 | 102 | 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/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/query/mod.rs#L94
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/query/mod.rs:94:43 | 94 | 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/master/index.html#needless_borrow
this can be `std::io::Error::other(_)`: src/query/term_set_query/term_set_query.rs#L148
warning: this can be `std::io::Error::other(_)` --> src/query/term_set_query/term_set_query.rs:148:26 | 148 | .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 148 - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; 148 + .map_err(|e| std::io::Error::other(e))?; |
this can be `std::io::Error::other(_)`: src/query/term_set_query/term_set_query.rs#L74
warning: this can be `std::io::Error::other(_)` --> src/query/term_set_query/term_set_query.rs:74:30 | 74 | .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 74 - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; 74 + .map_err(|e| std::io::Error::other(e))?; |
this call to `clone` can be replaced with `std::slice::from_ref`: src/query/term_query/term_query.rs#L102
warning: this call to `clone` can be replaced with `std::slice::from_ref` --> src/query/term_query/term_query.rs:102:61 | 102 | } => Bm25Weight::for_terms(statistics_provider, &[self.term.clone()])?, | ^^^^^^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(&self.term)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` on by default
initializer for `thread_local` value can be made `const`: src/postings/indexing_context.rs#L8
warning: initializer for `thread_local` value can be made `const` --> src/postings/indexing_context.rs:8:58 | 8 | static CONTEXT_POOL: RefCell<Vec<IndexingContext>> = RefCell::new(Vec::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(Vec::new()) }` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local = note: `#[warn(clippy::missing_const_for_thread_local)]` on by default
this call to `as_ref` does nothing: src/positions/borrowed_position_reader.rs#L67
warning: this call to `as_ref` does nothing --> src/positions/borrowed_position_reader.rs:67:31 | 67 | let num_bits: usize = self.bit_widths.as_ref()[..num_blocks] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.bit_widths` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref = note: `#[warn(clippy::useless_asref)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/index/segment_reader.rs#L557
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/index/segment_reader.rs:557:37 | 557 | CompositeFile::open(&positions_file) | ^^^^^^^^^^^^^^^ help: change this to: `positions_file` | = 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/index/segment_reader.rs#L248
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/index/segment_reader.rs:248:41 | 248 | CompositeFile::open(&positions_file) | ^^^^^^^^^^^^^^^ help: change this to: `positions_file` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this can be `std::io::Error::other(_)`: src/directory/ram_directory.rs#L194
warning: this can be `std::io::Error::other(_)` --> src/directory/ram_directory.rs:194:36 | 194 | io_error: Arc::new(io::Error::new(io::ErrorKind::Other, e.to_string())), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 194 - io_error: Arc::new(io::Error::new(io::ErrorKind::Other, e.to_string())), 194 + io_error: Arc::new(io::Error::other(e.to_string())), |
this can be `std::io::Error::other(_)`: src/directory/mmap_directory.rs#L32
warning: this can be `std::io::Error::other(_)` --> src/directory/mmap_directory.rs:32:5 | 32 | io::Error::new(io::ErrorKind::Other, msg) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 32 - io::Error::new(io::ErrorKind::Other, msg) 32 + io::Error::other(msg) |
using `clone` on type `f32` which implements the `Copy` trait: src/collector/top_score_collector.rs#L747
warning: using `clone` on type `f32` which implements the `Copy` trait --> src/collector/top_score_collector.rs:747:30 | 747 | .map(|d| d.feature.clone()) | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `d.feature` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `f32` which implements the `Copy` trait: src/collector/top_score_collector.rs#L737
warning: using `clone` on type `f32` which implements the `Copy` trait --> src/collector/top_score_collector.rs:737:30 | 737 | .map(|d| d.feature.clone()) | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `d.feature` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
very complex type used. Consider factoring parts into `type` definitions: src/collector/top_orderable.rs#L1386
warning: very complex type used. Consider factoring parts into `type` definitions --> src/collector/top_orderable.rs:1386:14 | 1386 | ) -> crate::Result<Vec<((Score, Option<String>), u64)>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/collector/top_orderable.rs#L1356
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/collector/top_orderable.rs:1356:55 | 1356 | let query_parser = QueryParser::for_index(&index, vec![field]); | ^^^^^^ help: change this to: `index` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/collector/top_orderable.rs#L715
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/collector/top_orderable.rs:715:19 | 715 | features: &Vec<(FeatureColumn, Order)>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[(FeatureColumn, Order)]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
large size difference between variants: src/aggregation/intermediate_agg_result.rs#L255
warning: large size difference between variants --> src/aggregation/intermediate_agg_result.rs:255:1 | 255 | / pub enum IntermediateAggregationResult { 256 | | /// Bucket variant 257 | | Bucket(IntermediateBucketResult), | | -------------------------------- the second-largest variant contains at least 56 bytes 258 | | /// Metric variant 259 | | Metric(IntermediateMetricResult), | | -------------------------------- the largest variant contains at least 376 bytes 260 | | } | |_^ the entire enum is at least 376 bytes | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant = note: `#[warn(clippy::large_enum_variant)]` on by default help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum | 259 - Metric(IntermediateMetricResult), 259 + Metric(Box<IntermediateMetricResult>), |
this can be `std::io::Error::other(_)`: src/aggregation/bucket/term_agg.rs#L521
warning: this can be `std::io::Error::other(_)` --> src/aggregation/bucket/term_agg.rs:521:40 | 521 | .map_err(|err| io::Error::new(io::ErrorKind::Other, err))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 521 - .map_err(|err| io::Error::new(io::ErrorKind::Other, err))?; 521 + .map_err(|err| io::Error::other(err))?; |
this can be `std::io::Error::other(_)`: src/tokenizer/tokenized_string.rs#L48
warning: this can be `std::io::Error::other(_)` --> src/tokenizer/tokenized_string.rs:48:17 | 48 | Err(io::Error::new( | _________________^ 49 | | io::ErrorKind::Other, 50 | | "Failed to parse string data as PreTokenizedString.", 51 | | )) | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 48 ~ Err(io::Error::other( 49 ~ "Failed to parse string data as PreTokenizedString.", |
this can be `std::io::Error::other(_)`: src/tokenizer/tokenized_string.rs#L35
warning: this can be `std::io::Error::other(_)` --> src/tokenizer/tokenized_string.rs:35:17 | 35 | Err(io::Error::new( | _________________^ 36 | | io::ErrorKind::Other, 37 | | "Failed to dump PreTokenizedString to json.", 38 | | )) | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error = note: `#[warn(clippy::io_other_error)]` on by default help: use `std::io::Error::other` | 35 ~ Err(io::Error::other( 36 ~ "Failed to dump PreTokenizedString to json.", |
this expression creates a reference which is immediately dereferenced by the compiler: src/indexer/segment_updater.rs#L516
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/indexer/segment_updater.rs:516:17 | 516 | &previous_metas, | ^^^^^^^^^^^^^^^ help: change this to: `previous_metas` | = 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
this `if` statement can be collapsed: src/indexer/merger.rs#L382
warning: this `if` statement can be collapsed --> src/indexer/merger.rs:382:13 | 382 | / if cnt % 1000 == 0 { 383 | | if self.cancel.wants_cancel() { 384 | | return Err(crate::TantivyError::Cancelled); 385 | | } 386 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if help: collapse nested if block | 382 ~ if cnt % 1000 == 0 383 ~ && self.cancel.wants_cancel() { 384 | return Err(crate::TantivyError::Cancelled); 385 ~ } |
this `if` statement can be collapsed: src/indexer/index_writer.rs#L127
warning: this `if` statement can be collapsed --> src/indexer/index_writer.rs:127:17 | 127 | / if *segment_id == segment_reader.segment_id() { 128 | | if doc_opstamps.is_deleted(*doc_id, *opstamp) { 129 | | alive_bitset.remove(*doc_id); 130 | | might_have_changed = true; 131 | | } 132 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 127 ~ if *segment_id == segment_reader.segment_id() 128 ~ && doc_opstamps.is_deleted(*doc_id, *opstamp) { 129 | alive_bitset.remove(*doc_id); 130 | might_have_changed = true; 131 ~ } |
you should consider adding a `Default` implementation for `DeleteQueue`: src/indexer/delete_queue.rs#L33
warning: you should consider adding a `Default` implementation for `DeleteQueue` --> src/indexer/delete_queue.rs:33:5 | 33 | / pub fn new() -> DeleteQueue { 34 | | DeleteQueue { 35 | | inner: Arc::default(), 36 | | } 37 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 31 + impl Default for DeleteQueue { 32 + fn default() -> Self { 33 + Self::new() 34 + } 35 + } |
struct `Bm25Params` is never constructed: src/query/bm25.rs#L72
warning: struct `Bm25Params` is never constructed --> src/query/bm25.rs:72:12 | 72 | pub struct Bm25Params { | ^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
hiding a lifetime that's elided elsewhere is confusing: src/postings/serializer.rs#L74
warning: hiding a lifetime that's elided elsewhere is confusing --> src/postings/serializer.rs:74:9 | 74 | &mut self, | ^^^^^^^^^ the lifetime is elided here ... 78 | ) -> io::Result<FieldSerializer> { | --------------- the same lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 78 | ) -> io::Result<FieldSerializer<'_>> { | ++++
hiding a lifetime that's elided elsewhere is confusing: src/index/merge_optimized_inverted_index_reader.rs#L84
warning: hiding a lifetime that's elided elsewhere is confusing --> src/index/merge_optimized_inverted_index_reader.rs:84:9 | 84 | &self, | ^^^^^ the lifetime is elided here ... 87 | ) -> io::Result<BorrowedSegmentPostings> { | ----------------------- the same lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 87 | ) -> io::Result<BorrowedSegmentPostings<'_>> { | ++++
hiding a lifetime that's elided elsewhere is confusing: src/index/merge_optimized_inverted_index_reader.rs#L66
warning: hiding a lifetime that's elided elsewhere is confusing --> src/index/merge_optimized_inverted_index_reader.rs:66:9 | 66 | &self, | ^^^^^ the lifetime is elided here ... 69 | ) -> io::Result<BorrowedBlockSegmentPostings> { | ---------------------------- the same lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 69 | ) -> io::Result<BorrowedBlockSegmentPostings<'_>> { | ++++
hiding a lifetime that's elided elsewhere is confusing: src/indexer/index_writer.rs#L663
warning: hiding a lifetime that's elided elsewhere is confusing --> src/indexer/index_writer.rs:663:27 | 663 | pub fn prepare_commit(&mut self) -> crate::Result<PreparedCommit<D>> { | ^^^^^^^^^ ----------------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: use `'_` for type paths | 663 | pub fn prepare_commit(&mut self) -> crate::Result<PreparedCommit<'_, D>> { | +++
this can be `std::io::Error::other(_)`: src/termdict/mod.rs#L96
warning: this can be `std::io::Error::other(_)` --> src/termdict/mod.rs:96:24 | 96 | return Err(io::Error::new( | ________________________^ 97 | | io::ErrorKind::Other, 98 | | format!( 99 | | "Unsupported dictionary type, compiled tantivy with {CURRENT_TYPE:?}, but got \ 100 | | {dict_type:?}", 101 | | ), 102 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 96 ~ return Err(io::Error::other( 97 ~ format!( |
this can be `std::io::Error::other(_)`: src/termdict/mod.rs#L89
warning: this can be `std::io::Error::other(_)` --> src/termdict/mod.rs:89:13 | 89 | / io::Error::new( 90 | | io::ErrorKind::Other, 91 | | format!("Unsupported dictionary type, found {dict_type}"), 92 | | ) | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 89 ~ io::Error::other( 90 ~ format!("Unsupported dictionary type, found {dict_type}"), |
this can be `std::io::Error::other(_)`: src/termdict/fst_termdict/termdict.rs#L131
warning: this can be `std::io::Error::other(_)` --> src/termdict/fst_termdict/termdict.rs:131:24 | 131 | return Err(io::Error::new( | ________________________^ 132 | | io::ErrorKind::Other, 133 | | format!("Unsupported fst version, expected {version}, found {FST_VERSION}",), 134 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 131 ~ return Err(io::Error::other( 132 ~ format!("Unsupported fst version, expected {version}, found {FST_VERSION}",), |
this can be `std::io::Error::other(_)`: src/termdict/fst_termdict/termdict.rs#L16
warning: this can be `std::io::Error::other(_)` --> src/termdict/fst_termdict/termdict.rs:16:5 | 16 | io::Error::new(io::ErrorKind::Other, e) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 16 - io::Error::new(io::ErrorKind::Other, e) 16 + io::Error::other(e) |
method `next` can be confused for the standard trait method `std::iter::Iterator::next`: src/termdict/fst_termdict/streamer.rs#L288
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/master/index.html#should_implement_trait = note: `#[warn(clippy::should_implement_trait)]` on by default
this can be `std::io::Error::other(_)`: src/store/store_compressor.rs#L238
warning: this can be `std::io::Error::other(_)` --> src/store/store_compressor.rs:238:25 | 238 | .map_err(|_err| io::Error::new(io::ErrorKind::Other, "Compressing thread panicked."))? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 238 - .map_err(|_err| io::Error::new(io::ErrorKind::Other, "Compressing thread panicked."))? 238 + .map_err(|_err| io::Error::other("Compressing thread panicked."))? |
this can be `std::io::Error::other(_)`: src/store/store_compressor.rs#L235
warning: this can be `std::io::Error::other(_)` --> src/store/store_compressor.rs:235:24 | 235 | .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Thread already joined."))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 235 - .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Thread already joined."))?; 235 + .ok_or_else(|| io::Error::other("Thread already joined."))?; |
this can be `std::io::Error::other(_)`: src/store/store_compressor.rs#L218
warning: this can be `std::io::Error::other(_)` --> src/store/store_compressor.rs:218:24 | 218 | return Err(io::Error::new(io::ErrorKind::Other, "Unidentified error.")); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 218 - return Err(io::Error::new(io::ErrorKind::Other, "Unidentified error.")); 218 + return Err(io::Error::other("Unidentified error.")); |
this can be `std::io::Error::other(_)`: src/schema/document/se.rs#L279
warning: this can be `std::io::Error::other(_)` --> src/schema/document/se.rs:279:24 | 279 | return Err(io::Error::new( | ________________________^ 280 | | io::ErrorKind::Other, 281 | | format!( 282 | | "Unexpected number of entries written to serializer, expected {} entries, got \ ... | 285 | | ), 286 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 279 ~ return Err(io::Error::other( 280 ~ format!( |
this can be `std::io::Error::other(_)`: src/schema/document/se.rs#L218
warning: this can be `std::io::Error::other(_)` --> src/schema/document/se.rs:218:24 | 218 | return Err(io::Error::new( | ________________________^ 219 | | io::ErrorKind::Other, 220 | | format!( 221 | | "Unexpected number of entries written to serializer, expected {} entries, got \ ... | 224 | | ), 225 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 218 ~ return Err(io::Error::other( 219 ~ format!( |
this can be `std::io::Error::other(_)`: src/schema/document/se.rs#L58
warning: this can be `std::io::Error::other(_)` --> src/schema/document/se.rs:58:24 | 58 | return Err(io::Error::new( | ________________________^ 59 | | io::ErrorKind::Other, 60 | | format!( 61 | | "Unexpected number of entries written to serializer, expected \ 62 | | {num_field_values} entries, got {actual_length} entries", 63 | | ), 64 | | )); | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 58 ~ return Err(io::Error::other( 59 ~ format!( |
item uses `packed` representation without ABI-qualification: src/schema/document/default_document.rs#L485
warning: item uses `packed` representation without ABI-qualification --> src/schema/document/default_document.rs:485:1 | 483 | #[repr(packed)] | ------ `packed` representation set here 484 | /// The value type and the address to its payload in the container. 485 | / struct ValueAddr { 486 | | type_id: ValueType, 487 | | /// This is the address to the value in the vec, except for bool and null, which are inlined 488 | | val_addr: Addr, 489 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicitly via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi
item uses `packed` representation without ABI-qualification: src/schema/document/default_document.rs#L21
warning: item uses `packed` representation without ABI-qualification --> src/schema/document/default_document.rs:21:1 | 18 | #[repr(packed)] | ------ `packed` representation set here ... 21 | / struct FieldValueAddr { 22 | | pub field: u16, 23 | | pub value_addr: ValueAddr, 24 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicitly via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi = note: `#[warn(clippy::repr_packed_without_abi)]` on by default
this can be `std::io::Error::other(_)`: src/query/term_set_query/term_set_query.rs#L148
warning: this can be `std::io::Error::other(_)` --> src/query/term_set_query/term_set_query.rs:148:26 | 148 | .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 148 - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; 148 + .map_err(|e| std::io::Error::other(e))?; |
this can be `std::io::Error::other(_)`: src/query/term_set_query/term_set_query.rs#L74
warning: this can be `std::io::Error::other(_)` --> src/query/term_set_query/term_set_query.rs:74:30 | 74 | .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 74 - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; 74 + .map_err(|e| std::io::Error::other(e))?; |
this call to `clone` can be replaced with `std::slice::from_ref`: src/query/term_query/term_query.rs#L102
warning: this call to `clone` can be replaced with `std::slice::from_ref` --> src/query/term_query/term_query.rs:102:61 | 102 | } => Bm25Weight::for_terms(statistics_provider, &[self.term.clone()])?, | ^^^^^^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(&self.term)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs = note: `#[warn(clippy::cloned_ref_to_slice_refs)]` on by default
initializer for `thread_local` value can be made `const`: src/postings/indexing_context.rs#L8
warning: initializer for `thread_local` value can be made `const` --> src/postings/indexing_context.rs:8:58 | 8 | static CONTEXT_POOL: RefCell<Vec<IndexingContext>> = RefCell::new(Vec::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(Vec::new()) }` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local = note: `#[warn(clippy::missing_const_for_thread_local)]` on by default
this call to `as_ref` does nothing: src/positions/borrowed_position_reader.rs#L67
warning: this call to `as_ref` does nothing --> src/positions/borrowed_position_reader.rs:67:31 | 67 | let num_bits: usize = self.bit_widths.as_ref()[..num_blocks] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.bit_widths` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref = note: `#[warn(clippy::useless_asref)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/index/segment_reader.rs#L557
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/index/segment_reader.rs:557:37 | 557 | CompositeFile::open(&positions_file) | ^^^^^^^^^^^^^^^ help: change this to: `positions_file` | = 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/index/segment_reader.rs#L248
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/index/segment_reader.rs:248:41 | 248 | CompositeFile::open(&positions_file) | ^^^^^^^^^^^^^^^ help: change this to: `positions_file` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this can be `std::io::Error::other(_)`: src/directory/ram_directory.rs#L194
warning: this can be `std::io::Error::other(_)` --> src/directory/ram_directory.rs:194:36 | 194 | io_error: Arc::new(io::Error::new(io::ErrorKind::Other, e.to_string())), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 194 - io_error: Arc::new(io::Error::new(io::ErrorKind::Other, e.to_string())), 194 + io_error: Arc::new(io::Error::other(e.to_string())), |
this can be `std::io::Error::other(_)`: src/directory/mmap_directory.rs#L32
warning: this can be `std::io::Error::other(_)` --> src/directory/mmap_directory.rs:32:5 | 32 | io::Error::new(io::ErrorKind::Other, msg) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 32 - io::Error::new(io::ErrorKind::Other, msg) 32 + io::Error::other(msg) |
using `clone` on type `f32` which implements the `Copy` trait: src/collector/top_score_collector.rs#L747
warning: using `clone` on type `f32` which implements the `Copy` trait --> src/collector/top_score_collector.rs:747:30 | 747 | .map(|d| d.feature.clone()) | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `d.feature` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `f32` which implements the `Copy` trait: src/collector/top_score_collector.rs#L737
warning: using `clone` on type `f32` which implements the `Copy` trait --> src/collector/top_score_collector.rs:737:30 | 737 | .map(|d| d.feature.clone()) | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `d.feature` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/collector/top_orderable.rs#L715
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/collector/top_orderable.rs:715:19 | 715 | features: &Vec<(FeatureColumn, Order)>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[(FeatureColumn, Order)]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
large size difference between variants: src/aggregation/intermediate_agg_result.rs#L255
warning: large size difference between variants --> src/aggregation/intermediate_agg_result.rs:255:1 | 255 | / pub enum IntermediateAggregationResult { 256 | | /// Bucket variant 257 | | Bucket(IntermediateBucketResult), | | -------------------------------- the second-largest variant contains at least 56 bytes 258 | | /// Metric variant 259 | | Metric(IntermediateMetricResult), | | -------------------------------- the largest variant contains at least 376 bytes 260 | | } | |_^ the entire enum is at least 376 bytes | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant = note: `#[warn(clippy::large_enum_variant)]` on by default help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum | 259 - Metric(IntermediateMetricResult), 259 + Metric(Box<IntermediateMetricResult>), |
this can be `std::io::Error::other(_)`: src/aggregation/bucket/term_agg.rs#L521
warning: this can be `std::io::Error::other(_)` --> src/aggregation/bucket/term_agg.rs:521:40 | 521 | .map_err(|err| io::Error::new(io::ErrorKind::Other, err))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 521 - .map_err(|err| io::Error::new(io::ErrorKind::Other, err))?; 521 + .map_err(|err| io::Error::other(err))?; |
this can be `std::io::Error::other(_)`: src/tokenizer/tokenized_string.rs#L48
warning: this can be `std::io::Error::other(_)` --> src/tokenizer/tokenized_string.rs:48:17 | 48 | Err(io::Error::new( | _________________^ 49 | | io::ErrorKind::Other, 50 | | "Failed to parse string data as PreTokenizedString.", 51 | | )) | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 48 ~ Err(io::Error::other( 49 ~ "Failed to parse string data as PreTokenizedString.", |
this can be `std::io::Error::other(_)`: src/tokenizer/tokenized_string.rs#L35
warning: this can be `std::io::Error::other(_)` --> src/tokenizer/tokenized_string.rs:35:17 | 35 | Err(io::Error::new( | _________________^ 36 | | io::ErrorKind::Other, 37 | | "Failed to dump PreTokenizedString to json.", 38 | | )) | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error = note: `#[warn(clippy::io_other_error)]` on by default help: use `std::io::Error::other` | 35 ~ Err(io::Error::other( 36 ~ "Failed to dump PreTokenizedString to json.", |
this expression creates a reference which is immediately dereferenced by the compiler: src/indexer/segment_updater.rs#L516
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/indexer/segment_updater.rs:516:17 | 516 | &previous_metas, | ^^^^^^^^^^^^^^^ help: change this to: `previous_metas` | = 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
this `if` statement can be collapsed: src/indexer/merger.rs#L382
warning: this `if` statement can be collapsed --> src/indexer/merger.rs:382:13 | 382 | / if cnt % 1000 == 0 { 383 | | if self.cancel.wants_cancel() { 384 | | return Err(crate::TantivyError::Cancelled); 385 | | } 386 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if help: collapse nested if block | 382 ~ if cnt % 1000 == 0 383 ~ && self.cancel.wants_cancel() { 384 | return Err(crate::TantivyError::Cancelled); 385 ~ } |
this `if` statement can be collapsed: src/indexer/index_writer.rs#L127
warning: this `if` statement can be collapsed --> src/indexer/index_writer.rs:127:17 | 127 | / if *segment_id == segment_reader.segment_id() { 128 | | if doc_opstamps.is_deleted(*doc_id, *opstamp) { 129 | | alive_bitset.remove(*doc_id); 130 | | might_have_changed = true; 131 | | } 132 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 127 ~ if *segment_id == segment_reader.segment_id() 128 ~ && doc_opstamps.is_deleted(*doc_id, *opstamp) { 129 | alive_bitset.remove(*doc_id); 130 | might_have_changed = true; 131 ~ } |
you should consider adding a `Default` implementation for `DeleteQueue`: src/indexer/delete_queue.rs#L33
warning: you should consider adding a `Default` implementation for `DeleteQueue` --> src/indexer/delete_queue.rs:33:5 | 33 | / pub fn new() -> DeleteQueue { 34 | | DeleteQueue { 35 | | inner: Arc::default(), 36 | | } 37 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 31 + impl Default for DeleteQueue { 32 + fn default() -> Self { 33 + Self::new() 34 + } 35 + } |
struct `Bm25Params` is never constructed: src/query/bm25.rs#L72
warning: struct `Bm25Params` is never constructed --> src/query/bm25.rs:72:12 | 72 | pub struct Bm25Params { | ^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unnecessary parentheses around closure body: src/termdict/fst_termdict/term_info_store.rs#L345
warning: unnecessary parentheses around closure body --> src/termdict/fst_termdict/term_info_store.rs:345:26 | 345 | let offset = |i| (i * 13 + i * i); | ^ ^ | help: remove these parentheses | 345 - let offset = |i| (i * 13 + i * i); 345 + let offset = |i| i * 13 + i * i; |
unnecessary parentheses around closure body: src/query/range_query/range_query_fastfield.rs#L314
warning: unnecessary parentheses around closure body --> src/query/range_query/range_query_fastfield.rs:314:50 | 314 | let bounds = bounds.map_bound(|term| (term.as_f64().unwrap())); | ^ ^ | help: remove these parentheses | 314 - let bounds = bounds.map_bound(|term| (term.as_f64().unwrap())); 314 + let bounds = bounds.map_bound(|term| term.as_f64().unwrap()); |
unnecessary parentheses around closure body: src/query/range_query/range_query_fastfield.rs#L290
warning: unnecessary parentheses around closure body --> src/query/range_query/range_query_fastfield.rs:290:50 | 290 | let bounds = bounds.map_bound(|term| (term.as_u64().unwrap())); | ^ ^ | help: remove these parentheses | 290 - let bounds = bounds.map_bound(|term| (term.as_u64().unwrap())); 290 + let bounds = bounds.map_bound(|term| term.as_u64().unwrap()); |
unnecessary parentheses around closure body: src/query/range_query/range_query_fastfield.rs#L266
warning: unnecessary parentheses around closure body --> src/query/range_query/range_query_fastfield.rs:266:50 | 266 | let bounds = bounds.map_bound(|term| (term.as_i64().unwrap())); | ^ ^ | help: remove these parentheses | 266 - let bounds = bounds.map_bound(|term| (term.as_i64().unwrap())); 266 + let bounds = bounds.map_bound(|term| term.as_i64().unwrap()); |
unused import: `ScoreTerm`: src/query/more_like_this/mod.rs#L6
warning: unused import: `ScoreTerm` --> src/query/more_like_this/mod.rs:6:46 | 6 | pub use self::more_like_this::{MoreLikeThis, ScoreTerm}; | ^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unnecessary parentheses around closure body: src/postings/serializer.rs#L129
warning: unnecessary parentheses around closure body --> src/postings/serializer.rs:129:30 | 129 | .map(|ff_reader| (total_num_tokens as Score / ff_reader.num_docs() as Score)) | ^ ^ | help: remove these parentheses | 129 - .map(|ff_reader| (total_num_tokens as Score / ff_reader.num_docs() as Score)) 129 + .map(|ff_reader| total_num_tokens as Score / ff_reader.num_docs() as Score) |
unnecessary parentheses around closure body: src/aggregation/bucket/histogram/histogram.rs#L304
warning: unnecessary parentheses around closure body --> src/aggregation/bucket/histogram/histogram.rs:304:36 | 304 | let get_bucket_pos = |val| (get_bucket_pos_f64(val, interval, offset) as i64); | ^ ^ | = note: `#[warn(unused_parens)]` on by default help: remove these parentheses | 304 - let get_bucket_pos = |val| (get_bucket_pos_f64(val, interval, offset) as i64); 304 + let get_bucket_pos = |val| get_bucket_pos_f64(val, interval, offset) as i64; |
unnecessary parentheses around closure body: src/query/range_query/range_query_fastfield.rs#L314
warning: unnecessary parentheses around closure body --> src/query/range_query/range_query_fastfield.rs:314:50 | 314 | let bounds = bounds.map_bound(|term| (term.as_f64().unwrap())); | ^ ^ | help: remove these parentheses | 314 - let bounds = bounds.map_bound(|term| (term.as_f64().unwrap())); 314 + let bounds = bounds.map_bound(|term| term.as_f64().unwrap()); |
unnecessary parentheses around closure body: src/query/range_query/range_query_fastfield.rs#L290
warning: unnecessary parentheses around closure body --> src/query/range_query/range_query_fastfield.rs:290:50 | 290 | let bounds = bounds.map_bound(|term| (term.as_u64().unwrap())); | ^ ^ | help: remove these parentheses | 290 - let bounds = bounds.map_bound(|term| (term.as_u64().unwrap())); 290 + let bounds = bounds.map_bound(|term| term.as_u64().unwrap()); |
unnecessary parentheses around closure body: src/query/range_query/range_query_fastfield.rs#L266
warning: unnecessary parentheses around closure body --> src/query/range_query/range_query_fastfield.rs:266:50 | 266 | let bounds = bounds.map_bound(|term| (term.as_i64().unwrap())); | ^ ^ | help: remove these parentheses | 266 - let bounds = bounds.map_bound(|term| (term.as_i64().unwrap())); 266 + let bounds = bounds.map_bound(|term| term.as_i64().unwrap()); |
unused import: `ScoreTerm`: src/query/more_like_this/mod.rs#L6
warning: unused import: `ScoreTerm` --> src/query/more_like_this/mod.rs:6:46 | 6 | pub use self::more_like_this::{MoreLikeThis, ScoreTerm}; | ^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unnecessary parentheses around closure body: src/postings/serializer.rs#L129
warning: unnecessary parentheses around closure body --> src/postings/serializer.rs:129:30 | 129 | .map(|ff_reader| (total_num_tokens as Score / ff_reader.num_docs() as Score)) | ^ ^ | help: remove these parentheses | 129 - .map(|ff_reader| (total_num_tokens as Score / ff_reader.num_docs() as Score)) 129 + .map(|ff_reader| total_num_tokens as Score / ff_reader.num_docs() as Score) |
unnecessary parentheses around closure body: src/aggregation/bucket/histogram/histogram.rs#L304
warning: unnecessary parentheses around closure body --> src/aggregation/bucket/histogram/histogram.rs:304:36 | 304 | let get_bucket_pos = |val| (get_bucket_pos_f64(val, interval, offset) as i64); | ^ ^ | = note: `#[warn(unused_parens)]` on by default help: remove these parentheses | 304 - let get_bucket_pos = |val| (get_bucket_pos_f64(val, interval, offset) as i64); 304 + let get_bucket_pos = |val| get_bucket_pos_f64(val, interval, offset) as i64; |
manually reimplementing `div_ceil`: columnar/src/columnar/writer/column_operation.rs#L247
warning: manually reimplementing `div_ceil` --> columnar/src/columnar/writer/column_operation.rs:247:5 | 247 | (msb + 7) / 8 | ^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `msb.div_ceil(8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
accessing first element with `header .read_bytes()? .as_slice().get(0)`: columnar/src/column_values/u64_based/mod.rs#L198
warning: accessing first element with `header .read_bytes()? .as_slice().get(0)` --> columnar/src/column_values/u64_based/mod.rs:198:33 | 198 | let codec_type: CodecType = header | _________________________________^ 199 | | .read_bytes()? 200 | | .as_slice() 201 | | .get(0) | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `#[warn(clippy::get_first)]` on by default help: try | 198 ~ let codec_type: CodecType = header 199 + .read_bytes()? 200 + .as_slice().first() |
manually reimplementing `div_ceil`: columnar/src/column_values/u64_based/linear.rs#L121
warning: manually reimplementing `div_ceil` --> columnar/src/column_values/u64_based/linear.rs:121:19 | 121 | + (num_bits as u64 * stats.num_rows as u64 + 7) / 8, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(num_bits as u64 * stats.num_rows as u64).div_ceil(8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
useless conversion to the same type: `std::ops::Range<usize>`: columnar/src/column_values/u64_based/bitpacked.rs#L197
warning: useless conversion to the same type: `std::ops::Range<usize>` --> columnar/src/column_values/u64_based/bitpacked.rs:197:21 | 197 | blocks: (0..block_count) | _____________________^ 198 | | .into_iter() | |____________________________^ help: consider removing `.into_iter()`: `(0..block_count)` | = 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
manually reimplementing `div_ceil`: columnar/src/column_values/u64_based/bitpacked.rs#L159
warning: manually reimplementing `div_ceil` --> columnar/src/column_values/u64_based/bitpacked.rs:159:34 | 159 | Some(stats.num_bytes() + (stats.num_rows as u64 * (num_bits_per_value as u64) + 7) / 8) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(stats.num_rows as u64 * (num_bits_per_value as u64)).div_ceil(8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil = note: `#[warn(clippy::manual_div_ceil)]` on by default
length comparison to zero: columnar/src/column_values/u64_based/bitpacked.rs#L29
warning: length comparison to zero --> columnar/src/column_values/u64_based/bitpacked.rs:29:30 | 29 | if block_num == 0 && self.blocks.len() == 0 { | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.blocks.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
this `repeat().take()` can be written more concisely: columnar/src/column_index/merge/stacked.rs#L110
warning: this `repeat().take()` can be written more concisely --> columnar/src/column_index/merge/stacked.rs:110:22 | 110 | Box::new(std::iter::repeat(1u32).take(optional_index.num_non_nulls() as usize)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(1u32, optional_index.num_non_nulls() as usize)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
this `repeat().take()` can be written more concisely: columnar/src/column_index/merge/stacked.rs#L108
warning: this `repeat().take()` can be written more concisely --> columnar/src/column_index/merge/stacked.rs:108:39 | 108 | ColumnIndex::Full => Box::new(std::iter::repeat(1u32).take(num_docs as usize)), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(1u32, num_docs as usize)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n = note: `#[warn(clippy::manual_repeat_n)]` on by default
associated items `to_code` and `try_from_code` are never used: columnar/src/column_index/optional_index/mod.rs#L343
warning: associated items `to_code` and `try_from_code` are never used --> columnar/src/column_index/optional_index/mod.rs:343:8 | 342 | impl OptionalIndexCodec { | ----------------------- associated items in this implementation 343 | fn to_code(self) -> u8 { | ^^^^^^^ ... 347 | fn try_from_code(code: u8) -> Result<Self, InvalidData> { | ^^^^^^^^^^^^^
enum `OptionalIndexCodec` is never used: columnar/src/column_index/optional_index/mod.rs#L337
warning: enum `OptionalIndexCodec` is never used --> columnar/src/column_index/optional_index/mod.rs:337:6 | 337 | enum OptionalIndexCodec { | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
hiding a lifetime that's elided elsewhere is confusing: sstable/src/dictionary.rs#L623
warning: hiding a lifetime that's elided elsewhere is confusing --> sstable/src/dictionary.rs:623:19 | 623 | pub fn stream(&self) -> io::Result<Streamer<TSSTable>> { | ^^^^^ ------------------ the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 623 | pub fn stream(&self) -> io::Result<Streamer<'_, TSSTable>> { | +++
hiding a lifetime that's elided elsewhere is confusing: sstable/src/dictionary.rs#L604
warning: hiding a lifetime that's elided elsewhere is confusing --> sstable/src/dictionary.rs:604:41 | 604 | pub fn prefix_range<K: AsRef<[u8]>>(&self, prefix: K) -> StreamerBuilder<TSSTable> { | ^^^^^ ------------------------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 604 | pub fn prefix_range<K: AsRef<[u8]>>(&self, prefix: K) -> StreamerBuilder<'_, TSSTable> { | +++
hiding a lifetime that's elided elsewhere is confusing: sstable/src/dictionary.rs#L599
warning: hiding a lifetime that's elided elsewhere is confusing --> sstable/src/dictionary.rs:599:18 | 599 | pub fn range(&self) -> StreamerBuilder<TSSTable> { | ^^^^^ ------------------------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: use `'_` for type paths | 599 | pub fn range(&self) -> StreamerBuilder<'_, TSSTable> { | +++
manually reimplementing `div_ceil`: sstable/src/sstable_index_v3.rs#L441
warning: manually reimplementing `div_ceil` --> sstable/src/sstable_index_v3.rs:441:12 | 441 | if (range_end_addr + self.range_start_nbits as usize + 7) / 8 > data.len() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(range_end_addr + self.range_start_nbits as usize).div_ceil(8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil = note: `#[warn(clippy::manual_div_ceil)]` on by default
this can be `std::io::Error::other(_)`: sstable/src/sstable_index_v3.rs#L397
warning: this can be `std::io::Error::other(_)` --> sstable/src/sstable_index_v3.rs:397:47 | 397 | tantivy_fst::Error::Fst(fst_error) => io::Error::new(io::ErrorKind::Other, fst_error), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error help: use `std::io::Error::other` | 397 - tantivy_fst::Error::Fst(fst_error) => io::Error::new(io::ErrorKind::Other, fst_error), 397 + tantivy_fst::Error::Fst(fst_error) => io::Error::other(fst_error), |
method `next` can be confused for the standard trait method `std::iter::Iterator::next`: sstable/src/streamer.rs#L389
warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` --> sstable/src/streamer.rs:389:5 | 389 | / pub fn next(&mut self) -> Option<(&[u8], &TSSTable::Value, A::State)> { 390 | | if self.advance() { 391 | | let st = self.current_state.clone().unwrap(); 392 | | Some((self.key(), self.value(), st)) ... | 396 | | } | |_____^ | = 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/master/index.html#should_implement_trait = note: `#[warn(clippy::should_implement_trait)]` on by default
this can be `std::io::Error::other(_)`: sstable/src/dictionary.rs#L309
warning: this can be `std::io::Error::other(_)` --> sstable/src/dictionary.rs:309:28 | 309 | return Err(io::Error::new( | ____________________________^ 310 | | io::ErrorKind::Other, 311 | | format!("Unsupported sstable version, expected one of [2, 3], found {version}"), 312 | | )) | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error = note: `#[warn(clippy::io_other_error)]` on by default help: use `std::io::Error::other` | 309 ~ return Err(io::Error::other( 310 ~ format!("Unsupported sstable version, expected one of [2, 3], found {version}"), |
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: stacker/src/memory_arena.rs#L127
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` --> stacker/src/memory_arena.rs:127:24 | 127 | let my_pages = std::mem::replace(&mut self.pages, Vec::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.pages)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default = note: `#[warn(clippy::mem_replace_with_default)]` on by default
redundant closure: stacker/src/memory_arena.rs#L111
warning: redundant closure --> stacker/src/memory_arena.rs:111:67 | 111 | static ARENA_POOL: Lazy<Arc<Mutex<Vec<MemoryArena>>>> = Lazy::new(|| Default::default()); | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Default::default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
calling .bytes() is very inefficient when data is not in memory: common/src/vint.rs#L226
warning: calling .bytes() is very inefficient when data is not in memory --> common/src/vint.rs:226:25 | 226 | let mut bytes = reader.bytes(); | ^^^^^^^^^^^^^^ | = help: consider using `BufReader` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unbuffered_bytes
calling .bytes() is very inefficient when data is not in memory: common/src/vint.rs#L62
warning: calling .bytes() is very inefficient when data is not in memory --> common/src/vint.rs:62:25 | 62 | let mut bytes = reader.bytes(); | ^^^^^^^^^^^^^^ | = help: consider using `BufReader` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unbuffered_bytes
calling .bytes() is very inefficient when data is not in memory: common/src/vint.rs#L32
warning: calling .bytes() is very inefficient when data is not in memory --> common/src/vint.rs:32:25 | 32 | let mut bytes = reader.bytes(); | ^^^^^^^^^^^^^^ | = help: consider using `BufReader` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unbuffered_bytes = note: `#[warn(clippy::unbuffered_bytes)]` on by default
this can be `std::io::Error::other(_)`: common/src/file_slice.rs#L351
warning: this can be `std::io::Error::other(_)` --> common/src/file_slice.rs:351:27 | 351 | Err(e) => Err(io::Error::new(io::ErrorKind::Other, e.to_string())), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error = note: `#[warn(clippy::io_other_error)]` on by default help: use `std::io::Error::other` | 351 - Err(e) => Err(io::Error::new(io::ErrorKind::Other, e.to_string())), 351 + Err(e) => Err(io::Error::other(e.to_string())), |
manually reimplementing `div_ceil`: common/src/bitset.rs#L186
warning: manually reimplementing `div_ceil` --> common/src/bitset.rs:186:5 | 186 | (max_val + 63u32) / 64u32 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `max_val.div_ceil(64u32)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil = note: `#[warn(clippy::manual_div_ceil)]` on by default
hiding a lifetime that's elided elsewhere is confusing: query-grammar/src/query_grammar.rs#L71
warning: hiding a lifetime that's elided elsewhere is confusing --> query-grammar/src/query_grammar.rs:71:14 | 71 | fn word(inp: &str) -> IResult<&str, Cow<str>> { | ^^^^ ---- -------- the same lifetime is hidden here | | | | | the same lifetime is elided here | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: use `'_` for type paths | 71 | fn word(inp: &str) -> IResult<&str, Cow<'_, str>> { | +++
manually reimplementing `div_ceil`: bitpacker/src/bitpacker.rs#L201
warning: manually reimplementing `div_ceil` --> bitpacker/src/bitpacker.rs:201:29 | 201 | let end_byte_read = (end_bit_read + 7) / 8; | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `end_bit_read.div_ceil(8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
casting to the same type is unnecessary (`usize` -> `usize`): bitpacker/src/bitpacker.rs#L128
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> bitpacker/src/bitpacker.rs:128:23 | 128 | if data_len % (BLOCK_SIZE_MIN as usize) == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `BLOCK_SIZE_MIN` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
manual implementation of `.is_multiple_of()`: bitpacker/src/bitpacker.rs#L128
warning: manual implementation of `.is_multiple_of()` --> bitpacker/src/bitpacker.rs:128:12 | 128 | if data_len % (BLOCK_SIZE_MIN as usize) == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data_len.is_multiple_of(BLOCK_SIZE_MIN as usize)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of = note: `#[warn(clippy::manual_is_multiple_of)]` on by default
casting to the same type is unnecessary (`usize` -> `usize`): bitpacker/src/bitpacker.rs#L127
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> bitpacker/src/bitpacker.rs:127:38 | 127 | let block_count = data_len / (BLOCK_SIZE_MIN as usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `BLOCK_SIZE_MIN` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
manually reimplementing `div_ceil`: bitpacker/src/bitpacker.rs#L51
warning: manually reimplementing `div_ceil` --> bitpacker/src/bitpacker.rs:51:29 | 51 | let num_bytes = (self.mini_buffer_written + 7) / 8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `self.mini_buffer_written.div_ceil(8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil = note: `#[warn(clippy::manual_div_ceil)]` on by default
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-all
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-all
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-all
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-all
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-quickwit
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-quickwit
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-quickwit
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-quickwit
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/