Split certificate module out of crate root #237
Merged
+1,508
−1,472
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR,
lib.rs
was 2258 lines long, and I found it quite hard to navigate. Here, I tried to split off acertificate
module coming in at 1497 lines (1215 without tests), reducinglib.rs
to 796 lines.The new module also follows a top-down ordering, following the prevailing style in rustls projects. While some of the smaller modules seem to be top-down oriented,
lib.rs
so far was closer to bottom-up, but its lack of consistent ordering was definitely one of the reasons I've found it hard to navigate.To build this, I took
Certificate
andCertificateParams
and move them into a separate module. Any types that are mainly used viaCertificate
andCertificateParams
are also moved. I have kept the OID definitions together (rather than moving the certificate-related ones tocertificate
) -- maybe we should move the ones that are only used incertificate
?At least for me, this will be much easier to navigate.