Skip to content

refactor: make show implement one of the methods#3402

Draft
peter-jerry-ye wants to merge 2 commits intomainfrom
zihang/adjust-show
Draft

refactor: make show implement one of the methods#3402
peter-jerry-ye wants to merge 2 commits intomainfrom
zihang/adjust-show

Conversation

@peter-jerry-ye
Copy link
Copy Markdown
Collaborator

@peter-jerry-ye peter-jerry-ye commented Mar 31, 2026

We are going to change the behavior of Show so that it is purely for displaying. So there will not be special handling for String or Char any more. As a result, the output and to_string would behave the same. Thus people only need to implement one of the methods.

This PR also migrates some of the builtin types' implementations to to_string, because use output would forcefully upcast StringBuider to &Logger, which will increase code in some cases.

@peter-jerry-ye
Copy link
Copy Markdown
Collaborator Author

Note : it seems that this requires compiler fix for the display of errors

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.

2 participants