Skip to content

Conversation

@domenicquirl
Copy link

Following up on https://github.com/ProbablyClem/utoipauto/pull/45/files/b7e3d4e670f4620d191549a99116ace7bb7fdac1#r1946540325: This PR reverts the check if a type is generic to exclude lifetimes, while leaving it at the top of the function as an early return (not reverting to individual checks per-attribute and also not reinstating the handling of aliases).

I'm honestly having a bit of a hard time still to determine what utoipauto wants to happen there, but since @DenuxPlays you indicated that it seems correct to you to check for generics excluding lifetimes this PR does that.

Note that I've changed the generics acceptance test, adding ToResponse derives to all the types and differentiating BorrowedResponse and NestedBorrowedResponse to introduce a struct that is generic only over its lifetime to validate my changes. For some reason the new output follows a different order than the old blessed expectation, but aside from that and the name change the remaining output should have stayed the same.

Copy link
Collaborator

@DenuxPlays DenuxPlays left a comment

Choose a reason for hiding this comment

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

LGTM

@DenuxPlays DenuxPlays merged commit 392310e into ProbablyClem:main Feb 10, 2025
7 checks passed
@domenicquirl domenicquirl deleted the bugfix/lifetime-generics branch February 10, 2025 09:20
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