-
-
Notifications
You must be signed in to change notification settings - Fork 338
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(widgets): Collect iterator of Row
into Table
#774
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #774 +/- ##
=====================================
Coverage 92.4% 92.4%
=====================================
Files 57 57
Lines 15000 15024 +24
=====================================
+ Hits 13866 13890 +24
Misses 1134 1134 ☔ 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.
LGTM, just had a few comments. Only the table widths one needs to be checked and addressed if needed. (On mobile rn, hard to check for me)
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 - just missing the full breaking change description.
commit message for the changelog should probably be something like
feat(table)!: accept IntoItertor<Into<Row>> for constructors
Table::new() now accepts ...
Table::from_iterator() ...
BREAKING CHANGE:
Calls to Table::new() passing rows as as an infered type
(e.g. `vec![]`) will no longer compile because the compiler
cannot to infer the type. (**reword this a bit better**)
A follow-up from ratatui#755, allowing any iterator whose item is convertible into `Row` to be collected into a `Table`. Where previously, `Table::new` accepted `IntoIterator<Item = Row>`, it now accepts `IntoIterator<Item: Into<Row>>`. BREAKING CHANGE: The compiler can no longer infer the element type of the container passed to `Table::new()`. For example, `Table::new(vec![], widths)` will no longer compile, as the type of `vec![]` can no longer be inferred.
b17bdc6
to
afb6689
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.
LGTM
Thanks again for the PR |
A follow-up from #755, allowing any iterator whose item is convertible into
Row
to be collected into aTable
.