Use vec::truncate for vec::retain