Skip to content

Fix TopNComputer threshold comparison (#51) #27

Fix TopNComputer threshold comparison (#51)

Fix TopNComputer threshold comparison (#51) #27

Triggered via push June 17, 2025 16:16
Status Success
Total duration 2m 19s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

long_running.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

74 warnings
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 explicity 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 explicity 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/set_query.rs#L55
warning: this can be `std::io::Error::other(_)` --> src/query/set_query.rs:55:26 | 55 | .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` | 55 - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; 55 + .map_err(|e| std::io::Error::other(e))?; |
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#L537
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/index/segment_reader.rs:537:37 | 537 | 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#L883
warning: using `clone` on type `f32` which implements the `Copy` trait --> src/collector/top_score_collector.rs:883:30 | 883 | .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#L873
warning: using `clone` on type `f32` which implements the `Copy` trait --> src/collector/top_score_collector.rs:873:30 | 873 | .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
large size difference between variants: src/aggregation/intermediate_agg_result.rs#L249
warning: large size difference between variants --> src/aggregation/intermediate_agg_result.rs:249:1 | 249 | / pub enum IntermediateAggregationResult { 250 | | /// Bucket variant 251 | | Bucket(IntermediateBucketResult), | | -------------------------------- the second-largest variant contains at least 56 bytes 252 | | /// Metric variant 253 | | Metric(IntermediateMetricResult), | | -------------------------------- the largest variant contains at least 376 bytes 254 | | } | |_^ 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 to reduce the total size of the enum | 253 - Metric(IntermediateMetricResult), 253 + 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#L492
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/indexer/segment_updater.rs:492:17 | 492 | &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
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 + } |
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/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 explicity 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 explicity 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/set_query.rs#L55
warning: this can be `std::io::Error::other(_)` --> src/query/set_query.rs:55:26 | 55 | .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` | 55 - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; 55 + .map_err(|e| std::io::Error::other(e))?; |
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#L537
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/index/segment_reader.rs:537:37 | 537 | 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#L883
warning: using `clone` on type `f32` which implements the `Copy` trait --> src/collector/top_score_collector.rs:883:30 | 883 | .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#L873
warning: using `clone` on type `f32` which implements the `Copy` trait --> src/collector/top_score_collector.rs:873:30 | 873 | .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
large size difference between variants: src/aggregation/intermediate_agg_result.rs#L249
warning: large size difference between variants --> src/aggregation/intermediate_agg_result.rs:249:1 | 249 | / pub enum IntermediateAggregationResult { 250 | | /// Bucket variant 251 | | Bucket(IntermediateBucketResult), | | -------------------------------- the second-largest variant contains at least 56 bytes 252 | | /// Metric variant 253 | | Metric(IntermediateMetricResult), | | -------------------------------- the largest variant contains at least 376 bytes 254 | | } | |_^ 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 to reduce the total size of the enum | 253 - Metric(IntermediateMetricResult), 253 + 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#L492
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/indexer/segment_updater.rs:492:17 | 492 | &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
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 + } |
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 && self.cancel.wants_cancel() { 383 + return Err(crate::TantivyError::Cancelled); 384 + } |
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() && doc_opstamps.is_deleted(*doc_id, *opstamp) { 128 + alive_bitset.remove(*doc_id); 129 + might_have_changed = true; 130 + } |
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 && self.cancel.wants_cancel() { 383 + return Err(crate::TantivyError::Cancelled); 384 + } |
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() && doc_opstamps.is_deleted(*doc_id, *opstamp) { 128 + alive_bitset.remove(*doc_id); 129 + might_have_changed = true; 130 + } |
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
manually reimplementing `div_ceil`: columnar/src/column_values/u64_based/bitpacked.rs#L113
warning: manually reimplementing `div_ceil` --> columnar/src/column_values/u64_based/bitpacked.rs:113:34 | 113 | 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
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
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}"), |
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
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
manually reimplementing `div_ceil`: bitpacker/src/bitpacker.rs#L141
warning: manually reimplementing `div_ceil` --> bitpacker/src/bitpacker.rs:141:29 | 141 | 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
test
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
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
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
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/