Also, it's probably faster to use
```
let mut ptr = v.as_ptr();
let mut end = ptr.offset(v.len());

while ptr < end {
   // ...
}
```

Although `safe_get` would require some modification.