Repository navigation
fix(relative): group month and year adjustments - #360
anastygnome wants to merge 1 commit into
Conversation
e8728e3 to
8921369
Compare
Merging this PR will degrade performance by 1.61%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
==========================================
- Coverage 98.97% 98.70% -0.27%
==========================================
Files 21 21
Lines 4698 4800 +102
Branches 143 148 +5
==========================================
+ Hits 4650 4738 +88
- Misses 47 61 +14
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8921369 to
54e0251
Compare
|
@sylvestre can we merge as is? The perf impact is already adressed in the perf pr |
54e0251 to
6a2a923
Compare
| relative: &[relative::Relative], | ||
| ) -> Result<RelativeAdjustment, error::Error> { | ||
| let mut result = RelativeAdjustment::default(); | ||
| for rel in relative { |
There was a problem hiding this comment.
almost the same checked_add block 6 times, could be dedup, no?
a small helper or closure taking the field and the error string would do
| /// applies all year/month changes together, followed by days and then the | ||
| /// clock units, rather than applying the input items one at a time. | ||
| #[derive(Clone, Copy, Debug, Default)] | ||
| struct RelativeAdjustment { |
There was a problem hiding this comment.
the comment here and the one at the call site say the same thing, please keep only one
|
thanks for this PR! |
|
@sylvestre will address your comments. |
eca934f to
3ac84ad
Compare
Summary