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
When calling into_iter(), the Slab returns an iterator that yields (usize, T).
But when calling drain(), only Ts are returned, and the indices of the elements are lost.
This is an inconsistency in the API, but also knowing these indices is necessary for my use case.
I'm currently bypassing this with mem::replace(&mut slab, Slab::new()).into_iter().
The text was updated successfully, but these errors were encountered:
When calling
into_iter()
, theSlab
returns an iterator that yields(usize, T)
.But when calling
drain()
, onlyT
s are returned, and the indices of the elements are lost.This is an inconsistency in the API, but also knowing these indices is necessary for my use case.
I'm currently bypassing this with
mem::replace(&mut slab, Slab::new()).into_iter()
.The text was updated successfully, but these errors were encountered: