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

style: Remove unnecessary commas #707

Closed

Conversation

sorairolake
Copy link

Looking at other codes, it seems better to eliminate these commas. So I'm going to remove these commas.

@jhpratt
Copy link
Member

jhpratt commented Sep 24, 2024

This likely isn't exhaustive, as I'm pretty sure I've run across more than just these in passing. Can you be sure that it is?

@jhpratt jhpratt added the C-cleanup Category: cleanup of existing code label Sep 24, 2024
@sorairolake
Copy link
Author

sorairolake commented Sep 24, 2024

@jhpratt This is applied to lines which match rg -F "),)". So I cannot be sure that this is exhaustive, and I don't think this likely is exhaustive.

First, I discovered a redundant comma in the following doctest:

/// assert_eq!(OffsetDateTime::UNIX_EPOCH, datetime!(1970-01-01 0:00 UTC),);

Next, I ran rg -F "),)" and discovered a similar redundant comma in the following line:

#[cfg(all(feature = "macros", any(feature = "formatting", feature = "parsing"),))]

@jhpratt
Copy link
Member

jhpratt commented Sep 25, 2024

If cleanup like this is being done, I'd like to be at least reasonably confident that it is exhaustive, lest we have a number of PRs substantially similar to this.

@jhpratt
Copy link
Member

jhpratt commented Oct 15, 2024

@sorairolake What's the status of this?

@sorairolake
Copy link
Author

@jhpratt I'm not confident that I can do cleanups like this thoroughly.

@jhpratt
Copy link
Member

jhpratt commented Oct 16, 2024

Closing for that reason. I'll probably end up digging through code myself with some more complicated regex in the near future.

@jhpratt jhpratt closed this Oct 16, 2024
@sorairolake sorairolake deleted the remove-unnecessary-comma branch October 16, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: cleanup of existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants