Skip to content

Address Clippy lints#392

Merged
BurntSushi merged 1 commit intoBurntSushi:masterfrom
thaliaarchi:clippy-fixes
Apr 5, 2025
Merged

Address Clippy lints#392
BurntSushi merged 1 commit intoBurntSushi:masterfrom
thaliaarchi:clippy-fixes

Conversation

@thaliaarchi
Copy link
Copy Markdown
Contributor

@thaliaarchi thaliaarchi commented Mar 18, 2025

Address several small Clippy suggestions.

@BurntSushi
Copy link
Copy Markdown
Owner

Please break this into 3 separate PRs.

@thaliaarchi thaliaarchi changed the title Use #[non_exhaustive] and address Clippy lints Address Clippy lints Mar 18, 2025
@thaliaarchi
Copy link
Copy Markdown
Contributor Author

I've split out #393 and #394.

Copy link
Copy Markdown
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of these are because of MSRV bumps, where code can be marginally simplified because of new Rust features/APIs. Those are generally fine.

But at least some of these are preference things that I don't agree with. This is why I don't have Clippy running on my repos, because there's too much that Clippy does by default that I don't agree with. I've long wanted to sit down and find the subset of lints I do agree with, but this is a lot of work to do. And then applying it to every other repo I have is just a ton of busy work. And honestly, most of the Clippy lints flagged in my code is more stylistic than it is catching bugs.

Comment thread csv-core/src/reader.rs Outdated
Comment thread src/byte_record.rs Outdated
Comment thread src/byte_record.rs Outdated
Comment thread src/serializer.rs Outdated
Comment thread src/tutorial.rs Outdated
Comment thread src/writer.rs Outdated
@thaliaarchi
Copy link
Copy Markdown
Contributor Author

Sorry for all the nits. I probably should have kept this to just #[non_exhaustive].

@thaliaarchi
Copy link
Copy Markdown
Contributor Author

Hey, friendly ping :). Since you already did a review and it's somewhat fresh, I just want to check in.

It seems like we've filtered out the objectionable bits, so it might be ready. I know it's an unimportant change, but I'd like to resolve this PR or even, since you don't usually use Clippy, just close it.

Copy link
Copy Markdown
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@BurntSushi BurntSushi merged commit da00088 into BurntSushi:master Apr 5, 2025
10 checks passed
@thaliaarchi thaliaarchi deleted the clippy-fixes branch April 5, 2025 18:50
jqnatividad added a commit to dathere/rust-csv that referenced this pull request Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants