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

Remove clippy warnings #36

Merged
merged 1 commit into from
Nov 30, 2023
Merged

Remove clippy warnings #36

merged 1 commit into from
Nov 30, 2023

Conversation

dongsupark
Copy link
Member

Address issues reported by cargo clippy.

  • Remove unnecessary use omaha.
  • Remove 'static for const strings.
  • Use Some(h) instead of map().
  • Remove map(f) on an Option value where f is a closure that returns unit type ().
  • Deref would be done by auto-deref.
  • Remove unneeded return.
  • Use if instead of match in case of equility checks.
  • Remove redundant pattern matching, use is_some().
  • Use From<Hash<T>> for Vec<u8> instead of Into<Vec<u8>> for Hash<T>.
  • Remove unnecessary Ok and question mark.

Note: issues in vendor/hard-xml* are not touched.

Fixes #32

Remove unnecessary "use omaha"
Remove 'static for const strings.
Use Some(h) instead of map().
Remove map(f) on an Option value where f is a closure that
returns unit type ().
Deref would be done by auto-deref.
Remove unneeded return.
Use if instead of match in case of equility checks.
Remove redundant pattern matching, use is_some().
Use From<Hash<T>> for Vec<u8> instead of Into<Vec<u8>> for Hash<T>.
Remove unnecessary Ok and question mark
@dongsupark dongsupark merged commit ee3918a into trunk Nov 30, 2023
1 check passed
@dongsupark dongsupark deleted the dongsu/clippy-202311 branch November 30, 2023 09:11
dongsupark added a commit to flatcar/scripts that referenced this pull request Dec 7, 2023
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.

Address cargo clippy warnings
2 participants