Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Improve Debug representation of Error #296

Merged
merged 4 commits into from Jul 30, 2022
Merged

Improve Debug representation of Error #296

merged 4 commits into from Jul 30, 2022

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jul 30, 2022

This matches the approach used for serde_json's errors, and is a good fit for the formatting that appears when .unwrap() is used.

Before:

UnknownAnchor(
    Mark {
        line: 1,
        column: 5,
    },
)

After:

Error("unknown anchor", line: 1, column: 5)

@dtolnay dtolnay merged commit 922c18f into master Jul 30, 2022
@dtolnay dtolnay deleted the debugerror branch July 30, 2022 05:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant