tonic
tonic copied to clipboard
Add From<T> for Response<T>
Hello,
Motivation
I've noticed that there's no From<T> implementation for Response<T> and thought it was worth having for the times when writing t.into() is snappier than Response::new(t).
Solution
I've added the trait impl.
I am trying to remember why we didn't include this. I know for requests we have IntoRequest. But I can't come up with why we shouldn't include this. Would love to hear from others @neoeinstein @davidpdrsn
This is going to have to wait for the next breaking change release.