Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a public function for source formatting #665

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

cocuh
Copy link
Contributor

@cocuh cocuh commented Feb 20, 2024

Alternative solution for #652.

In most cases, users don't need FormattingError enum itself, and just serializing the error message makes things easier in later code chagnes I believe.

@udoprog udoprog added the enhancement New feature or request label Feb 20, 2024
@udoprog
Copy link
Collaborator

udoprog commented Feb 20, 2024

You don't have to use anyhow to hide the error enum. A public struct with a private field implementing std::error::Error would achieve the same result without the feature test.

@udoprog udoprog enabled auto-merge (squash) February 22, 2024 11:47
@udoprog udoprog merged commit 79e81a0 into rune-rs:main Feb 22, 2024
9 of 11 checks passed
@udoprog
Copy link
Collaborator

udoprog commented Feb 22, 2024

Woops, the auto merged triggered prior to building 🤔. No big deal, I'll fix it when I get around to it.

Thanks!

@cocuh
Copy link
Contributor Author

cocuh commented Feb 22, 2024

Ooop, it seems my commit makes build failure. Let me create PR for the fix.

cocuh added a commit to cocuh/lang-rune that referenced this pull request Feb 22, 2024
udoprog pushed a commit that referenced this pull request Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants