I don't think the `to_unsafe_ptr` calls is needed.