utoipa icon indicating copy to clipboard operation
utoipa copied to clipboard

Fix: Refactor to avoid clippy::needless_for_each warning in derive(OpenApi)

Open raimannma opened this issue 6 months ago • 2 comments

This pull request includes a small change to the utoipa-gen/src/openapi.rs file. The change replaces the use of .iter().for_each with a for loop for iterating over modifiers in the ToTokensDiagnostics implementation for OpenApi.

Closes #1420

raimannma avatar Jun 30 '25 10:06 raimannma

@juhaku Can you take a look at this?

raimannma avatar Jul 11 '25 08:07 raimannma

For anyone that wants to use this until it gets merged, add the following to your Cargo.toml:

[patch.crates-io]
# https://github.com/juhaku/utoipa/pull/1423
utoipa = { git = "https://github.com/raimannma/utoipa.git", rev = "47aa9ff215db156b6cfe687cab858360c6fe4275" }

rblaine95 avatar Aug 12 '25 12:08 rblaine95