I'm curious why `unsafe` was used here rather than an iterator and a `collect`?