-
Notifications
You must be signed in to change notification settings - Fork 254
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: impl Widget for &str
and String
#952
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #952 +/- ##
=====================================
Coverage 91.9% 91.9%
=====================================
Files 61 61
Lines 15703 15723 +20
=====================================
+ Hits 14436 14456 +20
Misses 1267 1267 ☔ View full report in Codecov by Sentry. |
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.
Tests and docs needed.
889678f
to
a6a1b00
Compare
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.
Need to add some sort of comment to the Widget trait or widget module for this.
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.
LGTM
Currently,
f.render_widget("hello world".bold(), area)
works butf.render_widget("hello world", area)
doesn't. This PR changes that my implementingWidget
for&str
andString
. This makes it easier to render strings with no styles as widgets.Example usage: