Skip to content
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

Add ASN.1 Integer comparison and to_owned #1858

Merged
merged 2 commits into from
Mar 30, 2023
Merged

Add ASN.1 Integer comparison and to_owned #1858

merged 2 commits into from
Mar 30, 2023

Conversation

Skepfyr
Copy link
Collaborator

@Skepfyr Skepfyr commented Mar 28, 2023

Comparing integers is actually infallible excitingly so we can implement the proper traits for it.

}
impl PartialOrd for Asn1Integer {
fn partial_cmp(&self, other: &Asn1Integer) -> Option<Ordering> {
Some(self.cmp(other))
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't you just use Asn1IntegerRef::partial_cmp here as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could, but I couldn't see it making any difference and I'd already written this code.

Copy link
Contributor

Choose a reason for hiding this comment

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

So the stuff looks more similar.
yeah, its more a nit.

@sfackler sfackler merged commit 0138f52 into master Mar 30, 2023
@sfackler
Copy link
Owner

Thanks!

@Skepfyr Skepfyr deleted the asn1-integer-cmp branch March 30, 2023 08:46
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.

None yet

3 participants