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: implement Body for empty tuple #122

Closed
wants to merge 1 commit into from

Conversation

tottoto
Copy link
Contributor

@tottoto tottoto commented Jun 12, 2024

Implements Body for empty tuple, which is similar to Body for String.

@seanmonstar
Copy link
Member

seanmonstar commented Jun 12, 2024

I've been hesitant about this implementation, since it means any function returning "nothing" is returning an impl Body. I think users probably would end up finding that more surprising than convenient. (I also think the String imply was perhaps a mistake, but can't take it back now...)

In a similar way, neither Future nor Stream are implemented for ().

@tottoto
Copy link
Contributor Author

tottoto commented Jun 12, 2024

Makes sense. I agree that it is reasonable not to implement this.

@tottoto tottoto closed this Jun 12, 2024
@tottoto tottoto deleted the empty-tuple branch June 12, 2024 14:02
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