Skip to content

style: fix clippy lints - #2101

Merged
bwoebi merged 2 commits into
masterfrom
levi/clippy
Jun 14, 2023
Merged

style: fix clippy lints#2101
bwoebi merged 2 commits into
masterfrom
levi/clippy

Conversation

@morrisonlevi

@morrisonlevi morrisonlevi commented Jun 14, 2023

Copy link
Copy Markdown
Collaborator

Description

Explanation of lints:

  • #[must_use] doesn't make sense on functions that return () aka void.
  • Rust prefers using !foo.is_empty() over foo.len() > 0
  • Clippy likes unsafe functions to have their safety conditions documented.
  • There's no need to explicitly type the unit return type -> (); it's implicit in Rust.

There are more lints, but these ones were trivial to fix.

Readiness checklist

  • Changelog has been added to the release document.
  • Tests added for this feature/bug.

Reviewer checklist

  • Appropriate labels assigned.
  • Milestone is set.

@morrisonlevi morrisonlevi added this to the 0.88.0 milestone Jun 14, 2023
@morrisonlevi
morrisonlevi requested a review from a team as a code owner June 14, 2023 15:14
@bwoebi
bwoebi merged commit ccba04c into master Jun 14, 2023
@bwoebi
bwoebi deleted the levi/clippy branch June 14, 2023 16:57
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