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
The Iter and IterMut are composed of a contiguous case and a general case, and because of this we should forward most (non-adaptor) methods to the underlying iterators. The existing fold and rfold methods serve as examples. No new custom implementations of the methods are needed in ElementsBase or Baseiter.
The ultimate ones to forward are try_fold and try_rfold, but they need to wait for having stable signatures (all traits in the signature).
Good ones to forward:
nth
collect
all, any
find, find_map
Some don't matter because they use fold that we already forward: count, max, min, max_by etc, sum, product
The text was updated successfully, but these errors were encountered:
Regarding with methods to forward, @bluss has provided some good suggestions. If you'd like to investigate yourself, I recommend looking at the methods std::slice::Iter overrides and, since we can't yet forward try_fold and try_rfold, the methods of Iterator and DoubleEndedIterator that are implemented in terms of try_fold and try_rfold.
The
Iter
andIterMut
are composed of a contiguous case and a general case, and because of this we should forward most (non-adaptor) methods to the underlying iterators. The existingfold
andrfold
methods serve as examples. No new custom implementations of the methods are needed in ElementsBase or Baseiter.The ultimate ones to forward are
try_fold
andtry_rfold
, but they need to wait for having stable signatures (all traits in the signature).Good ones to forward:
Some don't matter because they use fold that we already forward: count, max, min, max_by etc, sum, product
The text was updated successfully, but these errors were encountered: