Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(http-types): implement IntoResponse for Either types #397

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

YHM404
Copy link
Contributor

@YHM404 YHM404 commented Jan 19, 2025

Resolve #395

Add IntoResponse implementations for Either types from rama_core::combinators. This allows Either types to be used as responses in handlers.

Added unit tests to verify the implementations work correctly for:

  • Either<&str, Vec>
  • Either3<&str, Vec, StatusCode>

Add IntoResponse implementations for Either types from rama_core::combinators.
This allows Either types to be used as responses in handlers.

Added unit tests to verify the implementations work correctly for:
- Either<&str, Vec<u8>>
- Either3<&str, Vec<u8>, StatusCode>
@YHM404 YHM404 force-pushed the zot6/either_into_response branch from e453a86 to b35ef40 Compare January 19, 2025 03:52
Copy link
Member

@GlenDC GlenDC left a comment

Choose a reason for hiding this comment

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

Flawless, thanks a lot for the swift resolution!

@GlenDC GlenDC merged commit c2b25b3 into plabayo:main Jan 19, 2025
34 checks passed
@YHM404 YHM404 deleted the zot6/either_into_response branch January 19, 2025 15:30
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.

impl IntoResponse for Either*
2 participants