Skip to content

improve marginal test json input - #1065

Merged
ahl merged 1 commit into
mainfrom
set-test-fix
Aug 20, 2026
Merged

improve marginal test json input#1065
ahl merged 1 commit into
mainfrom
set-test-fix

Conversation

@ahl

@ahl ahl commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator
{
      "type": "array",
      "minItems": 1,
      "uniqueItems": true
}

It's kind of bullshit. It works today because we don't deal with Sets properly, but a HashSet<serde_json::Value> or BTreeSet<serde_json::Value> won't work because it's not Eq or Ord (because of the float in there). Let's change this to something we ostensibly know how to construct.

#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct ArraySansItems(pub Vec<::serde_json::Value>);
pub struct ArraySansItems(pub ::std::vec::Vec<::serde_json::Value>);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that this is (and was) wrong: we're not enforcing the minItems constraint

@ahl
ahl merged commit 28c8eb6 into main Aug 20, 2026
4 checks passed
@ahl
ahl deleted the set-test-fix branch August 20, 2026 17:30
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