Clean up vortex_ensure_eq! - #10237
Merged
Merged
Conversation
connortsui20
force-pushed
the
ct/ensure-eq-hygiene
branch
from
October 2, 2026 20:53
b225ef5 to
733bed5
Compare
Merging this PR will not alter performance
|
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>
Claude-Session: https://claude.ai/code/session_01YUXDBd65US5mcKTxb2Xcer Signed-off-by: Claude <noreply@anthropic.com>
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
force-pushed
the
ct/ensure-eq-hygiene
branch
from
October 5, 2026 10:50
dd3ea54 to
4681c2d
Compare
robert3005
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.