Some functions pass both an array of indices and vertex count, and there’s an implicit assumption that all indices are in range. In debug this would be “validated” with assertions, but this should be validated when sanity checks are enabled even in release, and safely recover (informing the caller).
We want to protect against all memory safety issues, and throwing a Result error on invalid index data. In addition, encoding.rs has a few assert! macros that should return a Result error instead.
Some functions pass both an array of indices and vertex count, and there’s an implicit assumption that all indices are in range. In debug this would be “validated” with assertions, but this should be validated when sanity checks are enabled even in release, and safely recover (informing the caller).
We want to protect against all memory safety issues, and throwing a Result error on invalid index data. In addition, encoding.rs has a few assert! macros that should return a Result error instead.