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
I was trying some implementations for #88 std collections (WIP), but I hit a stumbling block on IntoParallelRefIterator and IntoParallelRefMutIterator. These both require their Item to be the type behind the reference, so the ParallelIterator's Item is this &Item and &mut Item respectively. That's OK for most collections, but the map iterators use (&K, &V) and (&K, &mut V).
It would be nicer if the Item represented the same as the parallel iterator, so both the typical &T and map's (&K, &V) can work. Perhaps some future collection would even like something that only emulates a reference, like a cell Ref or a MutexGuard.
With this made more general, it can also have a blanket implementation, like:
Users of this trait would now lose the ability to assume that par_iter() yields simple references, but I'm not sure that's actually needed or valuable.
Thoughts?
The text was updated successfully, but these errors were encountered:
I was trying some implementations for #88 std collections (WIP), but I hit a stumbling block on
IntoParallelRefIterator
andIntoParallelRefMutIterator
. These both require theirItem
to be the type behind the reference, so theParallelIterator
'sItem
is this&Item
and&mut Item
respectively. That's OK for most collections, but the map iterators use(&K, &V)
and(&K, &mut V)
.It would be nicer if the
Item
represented the same as the parallel iterator, so both the typical&T
and map's(&K, &V)
can work. Perhaps some future collection would even like something that only emulates a reference, like a cellRef
or aMutexGuard
.With this made more general, it can also have a blanket implementation, like:
Users of this trait would now lose the ability to assume that
par_iter()
yields simple references, but I'm not sure that's actually needed or valuable.Thoughts?
The text was updated successfully, but these errors were encountered: