LiveSplit / asr

Helper crate to write auto splitters for LiveSplit One's auto splitting runtime.
https://livesplit.org/asr/asr
Apache License 2.0
10 stars 10 forks source link

Replacing `ArrayVec` in `DeepPointer` with standard arrays #70

Closed Jujstme closed 1 year ago

Jujstme commented 1 year ago

This replaces the internal ArrayVec in the DeepPointer struct with a standard array.

This change is necessary for 2 reasons:

  1. The features provided by ArrayVec are not necessary for this implementation of DeepPointer
  2. Using a standard array allows to use the Copy trait on the DeepPointer struct, which is something ArrayVec is preventing.

Additionally, the assert! has been now removed. If a new DeepPointer is created with a shorter CAP than the number of offsets, the pointer path will just be truncated according to the value of CAP.

Jujstme commented 1 year ago

Closing as I'm integreating these changes in https://github.com/LiveSplit/asr/pull/71