Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust array unique

let mut list = Vec::from([1,4,4,0,5,-1,4,0]);
list.sort();
list.dedup();
assert_eq!([-1,0,1,4,5], &list[..])
 
PREVIOUS NEXT
Tagged: #rust #array #unique
ADD COMMENT
Topic
Name
1+5 =