PR #2620 #63
clippy
62 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 62 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.86.0 (05f9846f8 2025-03-31)
- cargo 1.86.0 (adf9b6ad1 2025-02-28)
- clippy 0.1.86 (05f9846f89 2025-03-31)
Annotations
Check warning on line 323 in src/store/reader.rs
github-actions / clippy
this `map_or` can be simplified
warning: this `map_or` can be simplified
--> src/store/reader.rs:323:29
|
323 | let alive = alive_bitset.map_or(true, |bitset| bitset.is_alive(doc_id));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_none_or instead
|
323 - let alive = alive_bitset.map_or(true, |bitset| bitset.is_alive(doc_id));
323 + let alive = alive_bitset.is_none_or(|bitset| bitset.is_alive(doc_id));
|
Check warning on line 307 in src/query/term_query/term_scorer.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/query/term_query/term_scorer.rs:307:36
|
307 | let words: Vec<&str> = std::iter::repeat("bbbb").take(term_freq).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("bbbb", term_freq)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 241 in src/query/term_query/term_scorer.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/query/term_query/term_scorer.rs:241:36
|
241 | let fieldnorms: Vec<u32> = std::iter::repeat(20u32).take(300).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(20u32, 300)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 175 in src/query/term_query/term_scorer.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/query/term_query/term_scorer.rs:175:36
|
175 | let fieldnorms: Vec<u32> = std::iter::repeat(10u32).take(3_000).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(10u32, 3_000)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 439 in src/query/boolean_query/block_wand.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/query/boolean_query/block_wand.rs:439:35
|
439 | .flat_map(|fieldnorm| iter::repeat(fieldnorm).take(REPEAT))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(fieldnorm, REPEAT)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 209 in src/positions/mod.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/positions/mod.rs:209:41
|
209 | let positions_delta: Vec<u32> = iter::repeat(CONST_VAL).take(2_000_000).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(CONST_VAL, 2_000_000)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 790 in src/collector/facet_collector.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/collector/facet_collector.rs:790:17
|
790 | iter::repeat(doc).take(count)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(doc, count)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 742 in src/collector/facet_collector.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/collector/facet_collector.rs:742:21
|
742 | iter::repeat(doc).take(count)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(doc, count)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 290 in src/tokenizer/ngram_tokenizer.rs
github-actions / clippy
using `map` over `inspect`
warning: using `map` over `inspect`
--> src/tokenizer/ngram_tokenizer.rs:290:22
|
290 | self.next_el.map(|offset| {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
290 ~ self.next_el.inspect(|&offset| {
291 | if self.s.is_empty() {
...
296 | self.next_el = Some(offset + first_codepoint_width);
297 ~ }
|
Check warning on line 1636 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1636:20
|
1636 | vec.extend(iter::repeat("fl").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("fl", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1635 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1635:20
|
1635 | vec.extend(iter::repeat("fi").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("fi", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1634 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1634:20
|
1634 | vec.extend(iter::repeat("y").take(2));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("y", 2)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1633 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1633:20
|
1633 | vec.extend(iter::repeat("u").take(4));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("u", 4)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1632 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1632:20
|
1632 | vec.extend(iter::repeat("th").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("th", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1631 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1631:20
|
1631 | vec.extend(iter::repeat("ss").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("ss", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1630 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1630:20
|
1630 | vec.extend(iter::repeat("oe").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("oe", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1629 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1629:20
|
1629 | vec.extend(iter::repeat("o").take(6));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("o", 6)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1628 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1628:20
|
1628 | vec.extend(iter::repeat("n").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("n", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1627 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1627:20
|
1627 | vec.extend(iter::repeat("d").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("d", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1626 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1626:20
|
1626 | vec.extend(iter::repeat("ij").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("ij", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1625 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1625:20
|
1625 | vec.extend(iter::repeat("i").take(4));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("i", 4)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1624 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1624:20
|
1624 | vec.extend(iter::repeat("e").take(4));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("e", 4)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1623 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1623:20
|
1623 | vec.extend(iter::repeat("c").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("c", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1622 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1622:20
|
1622 | vec.extend(iter::repeat("ae").take(1));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("ae", 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
Check warning on line 1621 in src/tokenizer/ascii_folding_filter.rs
github-actions / clippy
this `repeat().take()` can be written more concisely
warning: this `repeat().take()` can be written more concisely
--> src/tokenizer/ascii_folding_filter.rs:1621:20
|
1621 | vec.extend(iter::repeat("a").take(6));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n("a", 6)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n