I would like to eliminate duplicate elements from a vector while keeping the vector in the current order.
Below I have a proposed implementation. First, is this safe