Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add use_field_init_shorthand = true to rustfmt #21237

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Feb 13, 2025

We already use this style, in fact failing to do so gives a clippy warning:

error: redundant field names in struct initialization
   --> crates/polars-stream/src/nodes/joins/equi_join.rs:380:13
    |
380 |             sampled_probe_morsels: sampled_probe_morsels,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sampled_probe_morsels`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
    = note: `-D clippy::redundant-field-names` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::redundant_field_names)]`

Might as well let rustfmt take care of this automatically for us.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Feb 13, 2025
@ritchie46 ritchie46 merged commit bb035fa into pola-rs:main Feb 13, 2025
2 checks passed
@c-peters c-peters added the accepted Ready for implementation label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants