Skip to content

ensure: increase debug output buffer from 40 to 256 bytes - #461

Open
atheerium wants to merge 1 commit into
dtolnay:masterfrom
atheerium:increase-ensure-buffer-pr
Open

ensure: increase debug output buffer from 40 to 256 bytes#461
atheerium wants to merge 1 commit into
dtolnay:masterfrom
atheerium:increase-ensure-buffer-pr

Conversation

@atheerium

Copy link
Copy Markdown

This increases the buffer size used by the ensure! macro for formatting debug output from 40 bytes to 256 bytes, allowing more context to be shown in assertion failures while still preventing excessively long messages.

Also updates the test_too_long test to reflect the new buffer size:

  • 80-character strings now fit within the buffer (no longer trigger truncation)
  • 300-character strings still trigger truncation as expected

Fixes #406

This increases the buffer size used by the  macro for
formatting debug output from 40 bytes to 256 bytes, allowing more
context to be shown in assertion failures while still preventing
excessively long messages.

Also updates the test_too_long test to reflect the new buffer size:
- 80-character strings now fit within the buffer (no longer trigger truncation)
- 300-character strings still trigger truncation as expected

Fixes dtolnay#406
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.

Increase or remove ensure Debug output limit

1 participant