Skip to content

feat: use more compact default Debug format#52

Merged
andylokandy merged 1 commit intofast:mainfrom
kanru-contrib:compact-tree-debug
May 6, 2026
Merged

feat: use more compact default Debug format#52
andylokandy merged 1 commit intofast:mainfrom
kanru-contrib:compact-tree-debug

Conversation

@kanru
Copy link
Copy Markdown
Contributor

@kanru kanru commented Apr 21, 2026

Removes the empty line between errors and use box-drawing characters for compact rendering.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates exn’s default Debug formatting to render error trees more compactly by removing the extra blank separator line and switching to box-drawing characters.

Changes:

  • Update write_exn to print child frames using ├── / └── connectors and indentation.
  • Refresh Insta snapshots to match the new compact Debug output across linear and tree-shaped error graphs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
exn/src/debug.rs Changes the Debug tree rendering to use box-drawing connectors and removes the extra separator line.
exn/tests/snapshots/main__tree_error.snap Updates expected tree-shaped debug output to new connector style.
exn/tests/snapshots/main__linear_error.snap Updates expected linear-chain debug output to new connector style.
exn/tests/snapshots/main__result_ext.snap Updates expected debug output for ResultExt case.
exn/tests/snapshots/main__new_with_source.snap Updates expected debug output for Exn::new with source.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread exn/src/debug.rs
Comment thread exn/src/debug.rs Outdated
@kanru kanru force-pushed the compact-tree-debug branch 2 times, most recently from 2065b51 to 2f7daec Compare April 21, 2026 22:52
@kanru kanru requested a review from tisonkun April 24, 2026 12:51
@kanru
Copy link
Copy Markdown
Contributor Author

kanru commented Apr 24, 2026

I see, there are snapshot tests in the example. I'll fix those too.

@kanru kanru force-pushed the compact-tree-debug branch from 2f7daec to dc53f0c Compare April 24, 2026 21:46
@andylokandy
Copy link
Copy Markdown
Contributor

Thanks for the update. Could you rebase this onto the latest main, resolve the conflict, and refresh the tests?

Looks like maintainers cannot push to this branch directly, so we'll need your help with the update.

@kanru kanru force-pushed the compact-tree-debug branch from dc53f0c to 419c98a Compare May 4, 2026 12:14
Comment thread exn/src/lib.rs Outdated
@kanru kanru force-pushed the compact-tree-debug branch from 419c98a to 31e5c75 Compare May 4, 2026 14:30
@andylokandy
Copy link
Copy Markdown
Contributor

@kanru Thank you!

@andylokandy andylokandy merged commit fa1ecae into fast:main May 6, 2026
12 checks passed
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.

4 participants