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
Knowing the exact remaining length of the iterator would be nice in my use case, I'm deserializing params to T with serde and I need to keep track of the remaining length.
Because ParamsIter only wraps an std::slice::Iter, and that it already implements ExactSizeIterator we just have to forward the call to the inner Iter.
Another way to solve my issue would have been to directly use Params but I cannot access any elements because it doesn't implement Index.
What is your opinion on this @ibraheemdev? If you are ok with any of these two solution I will be happy to implement them.
The text was updated successfully, but these errors were encountered:
Implementing ExactSizeIterator seems reasonable. I would prefer to avoid making Params indexable by usize to allow, for example, switching the underlying representation to be HashMap<&str, &str> without a breaking change.
Knowing the exact remaining length of the iterator would be nice in my use case, I'm deserializing params to T with serde and I need to keep track of the remaining length.
Because
ParamsIter
only wraps anstd::slice::Iter
, and that it already implementsExactSizeIterator
we just have to forward the call to the innerIter
.Another way to solve my issue would have been to directly use
Params
but I cannot access any elements because it doesn't implementIndex
.What is your opinion on this @ibraheemdev? If you are ok with any of these two solution I will be happy to implement them.
The text was updated successfully, but these errors were encountered: