You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use IntoUrl for more ergonomic function signatures (payjoin#520)
Re: payjoin#513
Inspired by
[`reqwest::IntoUrl`](https://docs.rs/reqwest/latest/reqwest/trait.IntoUrl.html)
After some consideration, the goal is no longer to
remove `url` types from the public API. That crate is ancient and has a
stable release cadence and conservative MSRV targets (1.63 even with the
latest) that we can track.
However, I still think the `IntoUrl` interface makes our typestate
machines easier to work downstream with for the tradeoff of added
complexity in our crate.
Note, in payjoin-cli We're still validating URLs in configuration, and
using the `url::Url` abstraction in function signatures makes more sense
than becoming more loose for testing.
The greatest advantage of this change may accrue to downstream FFI
users, who I imagine use their native language's Url type and conversion
to a stringly type that payjoin-ffi handles using IntoUrl rather than
forcing them to use the `payjoin::Url` re-export and error handling.
0 commit comments