Skip to content

Clean up vortex_ensure_eq! - #10237

Merged
connortsui20 merged 8 commits into
developfrom
ct/ensure-eq-hygiene
Oct 5, 2026
Merged

connortsui20 merged 8 commits into
developfrom
ct/ensure-eq-hygiene

Conversation

@connortsui20

@connortsui20 connortsui20 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Most vortex_ensure_eq! calls build a message that repeats the two values being compared. The macro now includes those values automatically, so callers can omit the message or use it for context.

The default error shows both expressions and their values. Operands are borrowed and evaluated once, and custom messages are only evaluated on failure. This also fixes qualified vortex_ensure! calls that previously required a macro import.

Validation: five focused integration tests, two doctests, scoped Clippy and rustdoc with warnings denied, release checks for the affected import changes, and formatting passed. CI Rust lint and docs are green.

@codspeed

codspeed Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 2147 untouched benchmarks
⏩ 461 skipped benchmarks1
🗄️ 1 archived benchmark run2


Comparing ct/ensure-eq-hygiene (4681c2d) with develop (a88a2d6)

Open in CodSpeed

Footnotes

  1. 461 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. 1 benchmark was run, but is now archived. If it was deleted in another branch, consider rebasing to remove it from the report. Instead if it was added back, click here to restore it. ↩

@connortsui20 connortsui20 added the changelog/chore A trivial change label Oct 5, 2026
claude and others added 8 commits October 5, 2026 11:49
Mirror assert_eq!: with no message the error shows both expressions and
their Display values. A custom message (with an optional error variant)
keeps the values appended, so callers no longer need to format
"expected {}, got {}" by hand. Each operand is now evaluated once.

Claude-Session: https://claude.ai/code/session_01YUXDBd65US5mcKTxb2Xcer
Signed-off-by: Claude <noreply@anthropic.com>
Remove custom messages that only restated the compared values, and turn
plain equality vortex_ensure! checks into vortex_ensure_eq!. Messages
that add context are kept without the values, since the macro now
appends them.

Claude-Session: https://claude.ai/code/session_01YUXDBd65US5mcKTxb2Xcer
Signed-off-by: Claude <noreply@anthropic.com>
Remove custom messages that only restated the compared values, and turn
plain equality vortex_ensure! checks into vortex_ensure_eq!. Messages
that add context are kept without the values.

Claude-Session: https://claude.ai/code/session_01YUXDBd65US5mcKTxb2Xcer
Signed-off-by: Claude <noreply@anthropic.com>
Remove custom messages that only restated the compared values, and turn
plain equality vortex_ensure! checks into vortex_ensure_eq!. Messages
that add context are kept without the values.

Claude-Session: https://claude.ai/code/session_01YUXDBd65US5mcKTxb2Xcer
Signed-off-by: Claude <noreply@anthropic.com>
Remove custom messages that only restated the compared values, and turn
plain equality vortex_ensure! checks into vortex_ensure_eq!. Messages
that add context are kept without the values.

Claude-Session: https://claude.ai/code/session_01YUXDBd65US5mcKTxb2Xcer
Signed-off-by: Claude <noreply@anthropic.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20
connortsui20 enabled auto-merge (squash) October 5, 2026 11:00
@connortsui20
connortsui20 merged commit 23a59e3 into develop Oct 5, 2026
149 of 150 checks passed
@connortsui20
connortsui20 deleted the ct/ensure-eq-hygiene branch October 5, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants