Use unique() instead of collecting

This commit is contained in:
Zanie Blue 2025-07-04 12:59:14 -05:00
parent 3080b5882c
commit 539b02ef4a

View file

@ -3,6 +3,7 @@ use std::fmt::Formatter;
use std::sync::Arc; use std::sync::Arc;
use indexmap::IndexSet; use indexmap::IndexSet;
use itertools::Itertools;
use owo_colors::OwoColorize; use owo_colors::OwoColorize;
use pubgrub::{ use pubgrub::{
DefaultStringReporter, DerivationTree, Derived, External, Range, Ranges, Reporter, Term, DefaultStringReporter, DerivationTree, Derived, External, Range, Ranges, Reporter, Term,
@ -416,8 +417,7 @@ impl NoSolutionError {
.packages() .packages()
.into_iter() .into_iter()
.filter_map(|p| p.name()) .filter_map(|p| p.name())
.collect::<rustc_hash::FxHashSet<_>>() .unique()
.into_iter()
} }
} }