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

Chore: A few clippy inspired changes #2233

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Sep 19, 2023

  • Combine identical match branches into one statement with a | symbol
  • Use _ in a 9-bit binary values (I didn't even realize they were 9-bit instead of the common 8-bit until I did this)
  • Replaced a few .map().unwrap_or_else() with .map_or_else()
  • Use specific type with default() instead of Default::default() to make it easier to read/understand

axum-extra/src/extract/with_rejection.rs Outdated Show resolved Hide resolved
axum-extra/src/middleware.rs Outdated Show resolved Hide resolved
* Combine identical `match` branches into one statement with a `|` symbol
* Use `_` in a 9-bit binary values (I didn't even realize they were 9-bit instead of the common 8-bit until I did this)
Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidpdrsn davidpdrsn enabled auto-merge (squash) September 29, 2023 07:22
@davidpdrsn davidpdrsn merged commit 17993c5 into tokio-rs:main Sep 29, 2023
18 checks passed
@nyurik nyurik deleted the clippy branch July 31, 2024 23:15
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