Not if you use a hash set. This is expected O(n) time to de-duplicate an array of integers while maintaining the original order (more explicitly written than I normally would in Rust for didactical purposes):
let mut hash_set = HashSet::new();
let mut len = 0;
for i in 0..arr.len() {
if !hash_set.contains(&arr[i]) {
hash_set.insert(arr[i]);
arr[len] = arr[i];
len += 1;
}
}
arr.truncate(len);