Hacker News new | ask | show | jobs
by leshow 2622 days 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<_>>();
1 comments

Unfortunately that doesn't preserve case nor order of the input strings.