refactor(cli): name the set sort_unique builds

`sort_unique` collected its names into a `HashSet`, walked straight
back out of it, and collected again, all in one expression — the set
that does the deduplicating had no name. The only chain in the workspace
that `perfectionist::collection_round_trip` flags.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CWntUqQ2mPR1yxZNbAYNUg
This commit is contained in:
Zoltan KochanandClaude Opus 5 committed 2026-09-12 19:49:17 +02:00
1 parent 4acce56f6a
commit ea5af6b0de
1 file changed
+2 -1
@@ -288,7 +288,8 @@ pub(crate) fn clear_decided_ignored_builds(
/// Deduplicate and sort `names` by code unit, matching pnpm's
/// `sortUniqueStrings` (a `Set` then `lexCompare`).
fn sort_unique(names: Vec<String>) -> Vec<String> {
let mut unique: Vec<String> = names.into_iter().collect::<HashSet<_>>().into_iter().collect();
let deduplicated: HashSet<String> = names.into_iter().collect();
let mut unique: Vec<String> = deduplicated.into_iter().collect();
unique.sort();
unique
}