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
Does Vec.fromPtr(myArray).iter() provide the behaviour you're after?
On one hand, I generally consider Array<T> to be a non-rust item, so I don't think a built-in conversion for it is necessary. On the other hand, Vec is probably less used than the other rust-classes items, so maybe catering for arrays is worth it.
Problem
fromItems
fails on large arrays, andfromRawParts
is too verbose for simple array usage.Overview
Given an array, there are two ways (afaik) to make an
Iterator
:Using
fromItems
:Using
fromRawParts
:fromRawParts
is a bit too verbose for simple use cases, andfromItems
is the ideal happy path.Although,
fromItems
fails on large arrays. When trying to unpack large arrays, you'll get the following error:Proposal
To retain the ideal happy path usage, it would be great if there was a dedicated method for arrays.
The text was updated successfully, but these errors were encountered: