Open
Description
Currently, we cannot use this directly because the Step
trait is unstable. The issue can be tracked here: rust-lang/rust#42168
This causes adding manual and very noisy trait bounds:
where
Idx: Send
+ Sync
+ Clone
+ Copy
+ From<usize>
+ Into<usize>
+ Add<Idx, Output = Idx>
+ Sub<Idx, Output = Idx>
+ Ord,
which could simply be replaced by
where
Idx: Send + Sync + Step
A bigger problem is the implementation of the fetch_n
method which even affects the type of the returned iterator.
- If we could use
Idx: Step
trait bound, we could have simply returnedbegin_value..end_value
. - However, now we need to return
(begin_idx..end_idx).map(Idx::from)
Metadata
Metadata
Assignees
Labels
No labels