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
We could clarify in the documentation for the methods how to do this, or make new methods that take impl Iterator<Item = impl Into<&'a Borrowed>> which are then collected and put in a Cow::Owned.
I think I prefer the second alternative, since one would have to do an allocation either way if you have a Vec<Owned>.
@laundmo also mentions in the discord thread a solution that would involve a impl CollectionRef which abstracts over a collection, this would work for the impl Iterator route, and it would also work for a route where we make the stored collection in the Request generic over collection for those fields, albeit at a cost of more generics on that specific request.
This came up in discussion over at Twitch API Discord
currently, it can be hard to reason how to deal with a method like
we have a bunch of these after #280
One way to deal with this, given we have a
Vec<String>
, isbut coming up with this is not apparent.
This is related to #114 (comment) where we would make the allocation optional
The text was updated successfully, but these errors were encountered: