-
-
Notifications
You must be signed in to change notification settings - Fork 377
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(table)!: ensure that default and new() match #751
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #751 +/- ##
=====================================
Coverage 92.3% 92.3%
=====================================
Files 57 57
Lines 14880 14916 +36
=====================================
+ Hits 13746 13782 +36
Misses 1134 1134 ☔ View full report in Codecov by Sentry. |
Note the suggested changes above. The impact of this PR is that the column spacing will change unless you've manually specified this, and the last column will not fill the remaining space if your width constraints do not specify to do so. Also note that segment_size is gated behind a feature flag ( |
In #660 we introduced the segment_size field to the Table struct. However, we forgot to update the default() implementation to match the new() implementation. This meant that the default() implementation picked up SegmentSize::default() instead of SegmentSize::None. Additionally the introduction of Table::default() in an earlier PR, #339, was also missing the default for the column_spacing field (1). This commit fixes the default() implementation to match the new() implementation of these two fields by implementing the Default trait manually. BREAKING CHANGE: The default() implementation of Table now sets the column_spacing field to 1 and the segment_size field to SegmentSize::None. This will affect the rendering of a small amount of apps.
ff75fa9
to
5037bd3
Compare
Thanks for notifying the changes ! |
I'd like a second reviewer on this one before merging - mainly as a quick sanity check that this breaking change makes sense. |
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.
Makes sense to me, approved.
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
Resolved conflicts in BREAKING-CHANGES.md |
It was because this PR wasn't rebased on the latest |
Squash doesn't do a rebase, CI, then merge. it just does the rebase, merge part. The changes were textually non conflicting, just semantically. |
Thanks for notifying. But FTR, the warning for gstat-rs is a false alarm. |
In #660 we introduced the
segment_size field to the Table struct. However, we forgot to update
the default() implementation to match the new() implementation. This
meant that the default() implementation picked up SegmentSize::default()
instead of SegmentSize::None.
Additionally the introduction of Table::default() in an earlier PR,
#339, was also missing the
default for the column_spacing field (1).
This commit fixes the default() implementation to match the new()
implementation of these two fields by implementing the Default trait
manually.
BREAKING CHANGE: The default() implementation of Table now sets the
column_spacing field to 1 and the segment_size field to
SegmentSize::None. This will affect the rendering of a small amount of
apps.