-
Notifications
You must be signed in to change notification settings - Fork 600
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
feat: improve display format of literals #1494
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1494 +/- ##
============================================
+ Coverage 70.49% 70.53% +0.04%
Complexity 2766 2766
============================================
Files 1028 1029 +1
Lines 90195 90329 +134
Branches 1790 1790
============================================
+ Hits 63585 63717 +132
- Misses 25719 25721 +2
Partials 891 891
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What makes Normalized(1.0)
become 1.0
? Interesting 🤔
Debug -> Display, I think |
What's changed and what's your intention?
Improve display format of literals.
Use
fmt::Display
instead offmt::Debug
, except that string literals are wrapped with single quotation marks (e.g.'foo'
).Why implement
Display
instead ofToString
?https://doc.rust-lang.org/std/string/trait.ToString.html
Checklist
Refer to a related PR or issue link (optional)
None