ramosbugs / openidconnect-rs

OpenID Connect Library for Rust
MIT License
427 stars 103 forks source link

Implement `From<Url>` for `new_url_type`s #115

Closed garryod closed 1 year ago

garryod commented 1 year ago

I thought it would be nice to implement From<Url> for the url-like types. If there's a reason you believe this shouldn't be done (I note the existence of a from_url function) please feel free to close.

ramosbugs commented 1 year ago

Hey @garryod, thanks for the PR. However, omitting From<Url> was an intentional design decision that follows the rationale I outlined for NewTypes in general here: https://github.com/ramosbugs/oauth2-rs/issues/112#issuecomment-675801545.