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

fix: ensure Display impls of Expression and Value can not fail #94

Merged
merged 1 commit into from Oct 14, 2022

Conversation

martinohmann
Copy link
Owner

@martinohmann martinohmann commented Oct 14, 2022

Add to_string_unchecked to the format module and strict_mode option to the Formatter.

This is not public API since it might be removed again in favor of the changes proposed in #93. I'm undecided about the direction to go at the moment.

For now it's here to ensures that the to_string implementations of Expression and Value will never ever cause a panic. Since we cannot signal an error there, it's better to at least do best effort and return the formatted result even if identifiers are not valid.

This is not public API since it might be removed again in favor of the
changes proposed in #93.

For now it's here to ensures that the `to_string` implementations of
`Expression` and `Value` will never ever cause a panic. Since we cannot
signal an error there, it's better to at least do best effort and return
the formatted result even if identifiers are not valid.
@martinohmann martinohmann changed the title feat(format): add to_string_unchecked and strict_mode fix(format): ensure Display impls of Expression and Value never will emit an error Oct 14, 2022
@martinohmann martinohmann changed the title fix(format): ensure Display impls of Expression and Value never will emit an error fix(format): ensure Display impls of Expression and Value can not fail Oct 14, 2022
@martinohmann martinohmann changed the title fix(format): ensure Display impls of Expression and Value can not fail fix: ensure Display impls of Expression and Value can not fail Oct 14, 2022
@martinohmann martinohmann merged commit c840d6d into main Oct 14, 2022
@martinohmann martinohmann deleted the format-strict-mode branch October 14, 2022 15:46
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.

None yet

1 participant