Skip to content

Add ResultExt::unwrap_report - #564

Open
ChrisJr404 wants to merge 1 commit into
shepmaster:mainfrom
ChrisJr404:unwrap-report
Open

Add ResultExt::unwrap_report#564
ChrisJr404 wants to merge 1 commit into
shepmaster:mainfrom
ChrisJr404:unwrap-report

Conversation

@ChrisJr404

Copy link
Copy Markdown

Closes #375. Adds unwrap_report to ResultExt, following the sketch in the issue: on Err it panics with a Report of the error, so you get the Display output and the source chain instead of the Debug dump that Result::unwrap gives you.

I went with the name from the issue title. It's #[track_caller] like the other methods, and there are two integration tests in tests/report.rs covering the Ok path and the panic message.

Unwrap a Result, panicking with a Report of the error so the Display
output and source chain are shown instead of the Debug representation.
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for shepmaster-snafu ready!

Name Link
🔨 Latest commit c7f5712
🔍 Latest deploy log https://app.netlify.com/projects/shepmaster-snafu/deploys/6a8dd54ad0f6510008e04240
😎 Deploy Preview https://deploy-preview-564--shepmaster-snafu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Consider adding ResultExt::unwrap_report

1 participant