Skip to content

Add PartialEq for StringM with byte strings - #601

Merged
leighmcculloch merged 3 commits into
mainfrom
stringm-partialeq-byte-strings
Oct 5, 2026
Merged

leighmcculloch merged 3 commits into
mainfrom
stringm-partialeq-byte-strings

Conversation

@leighmcculloch

Copy link
Copy Markdown
Member

What

Implement PartialEq between StringM and byte strings ([u8], &[u8], [u8; N], &[u8; N]) so values like b"abc" can be compared directly.

Why

Comparing a StringM to a byte literal currently requires converting one side first, which is annoying in tests and matching code.

Copilot AI lite review requested due to automatic review settings October 2, 2026 12:51
@leighmcculloch
leighmcculloch requested a review from a team October 2, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Missing const-type support and reverse-direction comparisons block approval.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds direct byte-string equality support for owned StringM values and updates generated code and tests.

Changes:

  • Adds comparisons with byte slices and arrays.
  • Updates generated implementations and tests.
  • Blocking findings: add support for const::StringM and reverse-direction comparisons.
File Summary
xdr-generator-rust/​generator/​header.rs Adds PartialEq implementations and tests.
src/​generated.rs Contains regenerated implementations and tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread xdr-generator-rust/generator/header.rs Resolved
Comment thread xdr-generator-rust/generator/header.rs Resolved
Copilot AI lite review requested due to automatic review settings October 2, 2026 12:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

@leighmcculloch
leighmcculloch added this pull request to the merge queue Oct 5, 2026
Merged via the queue into main with commit be4d0ab Oct 5, 2026
407 checks passed
@leighmcculloch
leighmcculloch deleted the stringm-partialeq-byte-strings branch October 5, 2026 18:50
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.

3 participants