tower-h2
tower-h2 copied to clipboard
Decouple server::Error from MakeService
When server::Error is used in a generic way, but with a particular specialization of its MakeService type parameter, the type parameters and trait bounds of the specialization are included into the signature of the specialized server::Error, even though they may have no bearing on the actual variant error types.
Redefine server::Error with two generic type parameters that receive associated types Error and MakeError of a MakeService impl, sans the explicit trait bound. To reduce verbosity in the common case when both parameters get the same type, the second parameter defaults to the type of the first.
Resolves #50.
@carllerche do you have any opinions on this?