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

clippy: Fix comparison_* warnings #32058

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

eerii
Copy link
Contributor

@eerii eerii commented Apr 11, 2024

Fixes comparison_* clippy warnings. Also updates the spec comments in the files changed to be propper rustdoc.

  • comparison_to_empty: Use is_empty instead of an explicit comparison to an empty string.
  • comparison_chain: Use match and cmp::Ordering instead of an if / else if statements for comparing if a value is greater, lower and equal than other. This is a controversial lint, so I'm fine with changing it back and adding an allow.

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes are a part of Fix as many clippy problems as possible #31500
  • These changes do not require tests because they don't modify behaviour

@mrobinson mrobinson added this pull request to the merge queue Apr 12, 2024
Merged via the queue into servo:main with commit 88d4aff Apr 12, 2024
11 checks passed
@eerii eerii deleted the clippy_comparison branch April 12, 2024 09:42
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.

None yet

2 participants