`contains_reference` & `set_len`
PinnedVec::contains_reference
method is added to the trait definition. This method is expected to return true wheneverindex_of
returnsSome
. However, since thecontains_reference
requires less work and can return faster, a default implementation is not provided.- Helper method
slice::contains_reference
is implemented and made available to be used by the trait implementers. set_len
method is required.
Also
rand
andrand_chacha
dependencies are removed. These had been used only for creating random indices for theRefMap
struct, which is then used bytest_pinned_vec
method. Anstd::time
random index generator is used instead, which is good enough for this scenario.