Skip to content

style(lib): enforce clippy::redundant_closure_for_method_calls - #4251

Merged
cratelyn merged 1 commit into
hyperium:masterfrom
trivikr:clippy-redundant-closure-for-method-calls
Oct 29, 2026
Merged

cratelyn merged 1 commit into
hyperium:masterfrom
trivikr:clippy-redundant-closure-for-method-calls

Conversation

@trivikr

@trivikr trivikr commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

see #4071.

Clippy lint documentation is at https://clippy.rust-lang.org/master/index.html#redundant_closure_for_method_calls

The rule checks for closures which only invoke a method on the closure argument and can be replaced by referencing the method directly. Only three closures matched this rule, which called a single method without arguments. They were replaced by referencing the method directly.

see hyperium#4071.

replace closures that only call a method with the method path, and
remove the lint from the clippy allowlist.

@cratelyn cratelyn 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!

@cratelyn
cratelyn merged commit a8ab2c7 into hyperium:master Oct 29, 2026
24 checks passed
@trivikr
trivikr deleted the clippy-redundant-closure-for-method-calls branch October 29, 2026 20:18
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