Skip to content

impl hash for several string types #536

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

Merged
merged 2 commits into from
Apr 27, 2025
Merged

impl hash for several string types #536

merged 2 commits into from
Apr 27, 2025

Conversation

alex
Copy link
Owner

@alex alex commented Apr 27, 2025

No description provided.

@alex alex requested a review from Copilot April 27, 2025 12:08
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request implements the Hash trait for several ASN.1 string types. It updates the derive macros on PrintableString, Utf8String, BMPString, and UniversalString in src/types.rs and updates the README documentation to reflect these changes.

  • Added #[derive(Hash)] to PrintableString, Utf8String, BMPString, and UniversalString.
  • Updated README.md to document the new Hash implementation.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/types.rs Added Hash derive for string types to support hashing needs.
README.md Updated documentation to note the Hash support.
Comments suppressed due to low confidence (1)

src/types.rs:266

  • Consider adding unit tests to ensure that the derived Hash implementations for PrintableString, Utf8String, BMPString, and UniversalString behave as expected and produce consistent hash values.
#[derive(Clone, Debug, PartialEq, Eq, Hash)]

@reaperhulk reaperhulk merged commit c6b4c10 into main Apr 27, 2025
12 checks passed
@reaperhulk reaperhulk deleted the alex-patch-1 branch April 27, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants