EasyPost / rust-forwarded-header-value

Parser for the Forwarded HTTP header
ISC License
2 stars 0 forks source link

Remove `thiserror` dependency #2

Open chinedufn opened 9 months ago

chinedufn commented 9 months ago

Would you be open to removing the dependency on thiserror?

It seems like it's only being used on a single type.

This means that this crate rust-forwarded-header-value is pulling in syn (thereby severely hurting compile times) without getting much of a benefit.

I noticed this while evaluating axum-client-ip and seeing that it depends on your crate and that your crate depends on thiserror.

I think that given that this crate has been stable for 3 years it is unlikely to add any more error types.

So, it'd be fine to remove the thiserror dep and instead impl Error for ForwardedHeaderValueParseError and impl Display for ForwardedHeaderValueParseError by hand.