Skip to content

`contains_reference` & `set_len`

Compare
Choose a tag to compare
@orxfun orxfun released this 10 Mar 18:43
· 51 commits to main since this release
5154cd1
  • PinnedVec::contains_reference method is added to the trait definition. This method is expected to return true whenever index_of returns Some. However, since the contains_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 and rand_chacha dependencies are removed. These had been used only for creating random indices for the RefMap struct, which is then used by test_pinned_vec method. An std::time random index generator is used instead, which is good enough for this scenario.