Refactor slice-based type

Refactored a type that abstracts away if a
slice came from a memory reference or from
a vector to simplify it.

Bug: 284156656
Test: build & run project rust unit tests
Change-Id: Ib50168d65ae9bbaae19413266fca8b7c27466022
2 files changed