Skip to content

Conversation

raimannma
Copy link

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

…enApi)

By refactoring the macro to generate a for loop instead of using for_each, we now produce code that is cleaner and no longer triggers this clippy warning.
@raimannma
Copy link
Author

@juhaku Can you take a look at this?

@rblaine95
Copy link

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" }

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.

#[derive(OpenApi)] generates code that triggers clippy::needless_for_each warning

2 participants