http-rs / http-types

Common types for HTTP operations
https://docs.rs/http-types
Apache License 2.0
200 stars 83 forks source link

make Response::new return Result<Self> #327

Open yoshuawuyts opened 3 years ago

yoshuawuyts commented 3 years ago

So Response::new(9000) no longer panics but returns an error instead. This will match the new Request constructor as well.

This was brought up on Reddit in response to the v2.10.0 announcement and is actually something we should do.

Fishrock123 commented 3 years ago

I'd also prefer this change.