warp icon indicating copy to clipboard operation
warp copied to clipboard

Implemented Reply for a infallible result

Open comath opened this issue 4 years ago • 2 comments

http::Error implements From<Infallible>, this just shortcuts that so we can have an easy time with infallible results.

Another option is to implement the following:

impl<T,E> Reply for Result<T, E>
where
    T: Reply + Send,
    E: Reply + Send,
{ ... }

comath avatar Feb 10 '21 21:02 comath

For reference: The "other option", impl Reply for Result<T, E> where T: Reply, E: Reply, is suggested in #458 .

kaj avatar Feb 11 '21 12:02 kaj

For reference: The "other option", impl Reply for Result<T, E> where T: Reply, E: Reply, is suggested in #458 .

I should have looked around some more, sorry :). I thought it'd be much much more complicated than this simple addition.

comath avatar Feb 11 '21 22:02 comath