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

Use semicolons more when nothing is returned. #403

Conversation

waywardmonkeys
Copy link
Contributor

No description provided.

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

I reviewed this as it came in, but GitHub mobile apparently didn't submit it.

Sorry for the delay

}

fn line_to(&mut self, x: f32, y: f32) {
self.line_to(x, y)
Copy link
Member

Choose a reason for hiding this comment

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

I disagree with the title on principle - something is being returned, it's just the zero-sized unit

But this is better style, thanks! Was this found by automated means? If so, should the rules be committed somehow

@waywardmonkeys
Copy link
Contributor Author

This is https://rust-lang.github.io/rust-clippy/rust-1.73.0/index.html#/semicolon_if_nothing_returned

(hence the commit comment)

I'll amend this to enable this lint and see what happens.

@waywardmonkeys
Copy link
Contributor Author

Updated to enable the lint.

It'll be nice when we can configure these in Cargo.toml for the workspace.

@waywardmonkeys waywardmonkeys merged commit 28914d6 into linebender:main Nov 7, 2023
4 checks passed
@waywardmonkeys waywardmonkeys deleted the more-semicolons-more-more-more branch November 7, 2023 16:22
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