hyperium / http-body

Asynchronous HTTP body trait
MIT License
129 stars 50 forks source link

feat: implement Body for empty tuple #122

Closed tottoto closed 4 months ago

tottoto commented 4 months ago

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

seanmonstar commented 4 months ago

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 commented 4 months ago

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