Skip to content

the default set container demands nothing of its element - #54

Merged
ahl merged 1 commit into
mainfrom
set-default-vec
Nov 16, 2026
Merged

ahl merged 1 commit into
mainfrom
set-default-vec

Conversation

@ahl

@ahl ahl commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

The default set type renders a Vec and never used the ordering traits it demanded, so a set whose elements cannot be compared failed at finalize for no reason the output needed. A uniqueItems array records that the source promised distinct elements, not that the element type is comparable; iddqd's IdOrdMap marks its array uniqueItems because key uniqueness implies element uniqueness, and its elements carry floats. The obligation now lives only on a configured set container (BTreeSet, HashSet), where the compiler demands it. The tests that asserted the old default's demand configure a BTreeSet explicitly.

The default set type renders a Vec and never used the ordering traits it
demanded, so a set whose elements cannot be compared failed at finalize
for no reason the output needed. A uniqueItems array records that the
source promised distinct elements, not that the element type is
comparable; iddqd's IdOrdMap marks its array uniqueItems because key
uniqueness implies element uniqueness, and its elements carry floats.
The obligation now lives only on a configured set container (BTreeSet,
HashSet), where the compiler demands it. The tests that asserted the old
default's demand configure a BTreeSet explicitly.
@ahl
ahl merged commit fff076b into main Nov 16, 2026
10 checks passed
@ahl
ahl deleted the set-default-vec branch November 16, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant