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

Make Signature::new a const fn #810

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

kpp
Copy link
Contributor

@kpp kpp commented Nov 25, 2024

Motivation

Before #719 Signature fields were public and it was possible to create Signature { r, s, odd_y_parity } in a const context.

Solution

Make Signature::new a const fn.

PR Checklist

  • Added Tests no need.
  • Added Documentation no need.
  • Breaking changes no need.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

@klkvr I believe before we change the sig this was non const

but we can make this const now I believe?

@klkvr klkvr merged commit 33f8927 into alloy-rs:main Nov 26, 2024
30 checks passed
@kpp kpp deleted the kpp/signature-const-new branch November 27, 2024 03:14
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.

4 participants