3 ms·
You don't even need the filter, all you need is: let dedup = strings.into_iter().map(|s| s.to_lowercase()).collect::<HashSet<_>>().into_iter().collect::<Ve
by leshow 8y ago
You don't even need the filter, all you need is:
let dedup = strings.into_iter().map(|s| s.to_lowercase()).collect::<HashSet<_>>().into_iter().collect::<Vec<_>>();
- DougBTX 8y agoUnfortunately that doesn't preserve case nor order of the input strings.