fix: remove dead code, fix ns_comment remainder, and correct doc comments#241
Open
sumleo wants to merge 2 commits intorusticata:masterfrom
Open
fix: remove dead code, fix ns_comment remainder, and correct doc comments#241sumleo wants to merge 2 commits intorusticata:masterfrom
sumleo wants to merge 2 commits intorusticata:masterfrom
Conversation
…ents - Remove unused `rem.take(rem.input_len())` in extension parser that had no effect (take returns a new value without mutating rem) - Fix ns_comment fallback parser to return empty remainder using take_from() instead of take(), which incorrectly returned the full input as the remainder - Fix doc comments in X509CertificationRequestInfo that incorrectly referred to "CRL entry extensions" instead of "CSR attributes"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Three small fixes:
Dead code in extension parser (
extensions/mod.rs): Removedrem.take(rem.input_len())which had no effect —takereturns a new value without mutatingrem, so the result was silently discardedIncorrect remainder in ns_comment fallback (
extensions/ns_comment.rs): The fallback parser for non-IA5String-wrapped comments usedinput.take(input.input_len())as the remainder, which returns the full input instead of an empty slice. Fixed to useinput.take_from(input.input_len())consistent with the pattern used ingeneralname.rsWrong doc comments (
certification_request.rs): Four doc comments onX509CertificationRequestInfomethods incorrectly referred to "CRL entry extensions" instead of "CSR attributes"Test plan
cargo test --all-features