Skip to content

Fix manual_assert lint#4079

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
xd009642:manual_assert_lint_fix
May 27, 2026
Merged

Fix manual_assert lint#4079
seanmonstar merged 1 commit into
hyperium:masterfrom
xd009642:manual_assert_lint_fix

Conversation

@xd009642

Copy link
Copy Markdown
Contributor

As per #4071 fix instances where the manual_assert lint triggered on the code. This was able to be done with a clippy --fix with further cleanup to change !<expr>.is_some() in the assert to <expr>.is_none().

@xd009642 xd009642 force-pushed the manual_assert_lint_fix branch from 560c801 to 1b8934f Compare May 27, 2026 03:17
@xd009642

Copy link
Copy Markdown
Contributor Author

For some reason the fmt command in the contributing docs changes nothing for me on the same rustfmt version... Applying manually

@seanmonstar

Copy link
Copy Markdown
Member

Yea, cargo fmt is not able to work because of the use of macros to tame the inclusion of modules conditionally. The job prints out what actually works: rustfmt --edition 2021 $(git ls-files '*.rs').

@xd009642

xd009642 commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

So the command the job printed out didn't do anything on my system... I did already try it 😓

EDIT: Seemed it worked if I ran it inside the src dir just not in the project root.... No idea why though 🫠

As per hyperium#4071 fix instances where the manual_assert lint triggered on the
code. This was able to be done with a `clippy --fix` with further
cleanup to change `!<expr>.is_some()` in the assert to `<expr>.is_none()`.
@xd009642 xd009642 force-pushed the manual_assert_lint_fix branch from 1b8934f to 4365d57 Compare May 27, 2026 13:13

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@seanmonstar seanmonstar merged commit 79dbab6 into hyperium:master May 27, 2026
23 checks passed
@xd009642 xd009642 deleted the manual_assert_lint_fix branch May 27, 2026 13:25
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