arlyon / async-stripe

Async (and blocking!) Rust bindings for the Stripe API
https://payments.rs
Apache License 2.0
453 stars 130 forks source link

Implement Expandable::into_id #536

Closed mzeitlin11 closed 5 months ago

mzeitlin11 commented 5 months ago

Is unfortunate to have to add another method to the Object trait to achieve this. But not sure of another way to implement a generic way to pull an owned T::Id out of Expandable<T> without cloning (ran into needing this when using this next branch, but think it's probably relatively common since most requests won't set expand, so users will probably only want the id in Expandable<T>.

arlyon commented 5 months ago

Looks OK to me.