Closed pitdicker closed 7 months ago
I would also like to just get rid of Parsed::new()
in favor of relying on Parsed::default()
.
I would also like to just get rid of
Parsed::new()
in favor of relying onParsed::default()
.
Just realized I only dislike Default::default()
because of the name 😆.
Sorry for the failing CI: I'll fix it at a better PC later today.
Attention: Patch coverage is 99.59596%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 94.10%. Comparing base (
5982de9
) to head (df46038
). Report is 13 commits behind head on 0.5.x.
Files | Patch % | Lines |
---|---|---|
src/format/parsed.rs | 99.15% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The first commit changes the signature of the
Parsed::set_*
methods to be usable in a builder pattern, returningParseResult<&mut Parsed>
.Now that they can be used in a builder pattern, the second commit replaces the
parsed!
macro informat::parse
. That accounts for 250 of the changed lines in this PR.Then we can change the fields of
Parsed
to private, and update the tests to no longer set them to invalid values.The final commit removes some range checks from
Parsed::_to
that have now become unnecessary.