emilk opened a new pull request, #24837:
URL: https://github.com/apache/datafusion/pull/24837

   ## Which issue does this PR close?
   
   - Part of #18467.
   
   ## Rationale for this change
   
   Continuing the work in:
   
   - #24466
   - #24566
   
   Turn on more `clippy::pedantic` lints from the opt-out list in `Cargo.toml`,
   picking ones that buy performance, correctness, or readability.
   
   ## What changes are included in this PR?
   
   One commit per lint, each removing its `"allow"` line from `Cargo.toml` and
   fixing every site. Review one commit at a time!
   
   Let me know if you disagree with any and I'll revert it.
   
   | Lint | Sites | Fix |
   | 
------------------------------------------------------------------------------------------------------------------------------------------------------
 | ----: | 
------------------------------------------------------------------------------- 
|
   | 
[`needless_bitwise_bool`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_bitwise_bool)
                                             |     1 | `#[expect]`: the 
non-short-circuiting `\|` is the point of the branchless IN-list kernel |
   | 
[`unicode_not_nfc`](https://rust-lang.github.io/rust-clippy/master/index.html#unicode_not_nfc)
                                                         |     2 | two copies 
of the same decomposed literal; one now covers the composed form, both written 
with `\u{...}` |
   | 
[`format_collect`](https://rust-lang.github.io/rust-clippy/master/index.html#format_collect)
                                                           |     4 | `fold` + 
`write!` into one `String` instead of a `format!` alloc per item        |
   | 
[`large_digit_groups`](https://rust-lang.github.io/rust-clippy/master/index.html#large_digit_groups)
                                                   |     3 | `#[expect]`: the 
single `_` marks the decimal point of fixed-point test literals |
   | 
[`borrow_as_ptr`](https://rust-lang.github.io/rust-clippy/master/index.html#borrow_as_ptr)
                                                             |     6 | explicit 
`&raw const` / `&raw mut`                                               |
   | 
[`doc_comment_double_space_linebreaks`](https://rust-lang.github.io/rust-clippy/master/index.html#doc_comment_double_space_linebreaks)
                 |     8 | stray trailing spaces, not intended hard breaks      
                            |
   | 
[`single_char_pattern`](https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern)
                                                 |    23 | `char` patterns 
instead of one-character `&str` patterns                         |
   | 
[`format_push_string`](https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string)
                                                   |    42 | 
`write!`/`writeln!` into the target `String`, dropping the temporary alloc      
 |
   | 
[`ptr_as_ptr`](https://rust-lang.github.io/rust-clippy/master/index.html#ptr_as_ptr)
                                                                   |    83 | 
`ptr.cast::<T>()`, which cannot silently change constness                       
 |
   
   Two commits are not lint removals:
   
   - The generated protobuf modules carry `#[allow(clippy::all)]`, but pedantic 
is
     a separate group, so pedantic lints fired on code that cannot be hand-fixed
     (`regen.sh` output is CI-verified unchanged). They now also allow
     `clippy::pedantic`. This clears a pre-existing `cloned_instead_of_copied`
     warning that arrived with #24669.
   - `implicit_hasher` stays off, with the reason recorded in the `Cargo.toml`
     comment: `out_ref_col_with_metadata` forwards its map to arrow's
     `Field::with_metadata`, which requires the default hasher, and generalizing
     the rest pushes `S` through 
`Column::normalize_with_schemas_and_ambiguity_check`
     and needs a type annotation at every caller passing `&[]`.
   
   ## What is the testing strategy for this PR?
   
   `cargo clippy --workspace --all-targets --all-features -- -D warnings` 
reports
   no warnings, and the extended test suite passes. The changes are mechanical 
and
   behavior-preserving, so no new tests, with one exception: the 
`unicode_not_nfc`
   commit turns a duplicated `reverse` test case into real coverage of the
   composed grapheme.
   
   ## Are there any user-facing changes?
   
   No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to