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

Precise type splits #180

Closed
wants to merge 6 commits into from

Conversation

uncomputable
Copy link
Collaborator

Split sum and product types with separate methods for better readability.

@uncomputable uncomputable force-pushed the types branch 5 times, most recently from a60b5c8 to 503f09f Compare November 26, 2023 10:20
Regex crate requires rust 1.65+
We assert that the type is a sum / product and access its children at
the same time. This is more precise than using split.
These methods are more precise and make the code more readable.
Simplifies the code
Copy link
Collaborator

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK e0a2cae

apoelstra added a commit that referenced this pull request Nov 27, 2023
e0a2cae Bit Machine: Split types (Christian Lewe)
8cc05da Types: Replace split with split_{sum, product} (Christian Lewe)
1afbd35 Types: Split sum and product (Christian Lewe)
cbfa045 Fuzz: Update toolchain (Christian Lewe)
dd2e7f8 MSRV: Pin byteorder (Christian Lewe)
454727e Clippy: Fix lints (Christian Lewe)

Pull request description:

  Split sum and product types with separate methods for better readability.

ACKs for top commit:
  apoelstra:
    ACK e0a2cae

Tree-SHA512: e36c41714c9a9c102e4069448696d002fbc844d677bbdf5ccfb83c0dbbf84ff68950b474c8310f23d7018f6171ba8098f9f1f80559cc3f8b3d99027208d6dbc4
@apoelstra
Copy link
Collaborator

Merged. I dunno why github thinks it's closed.

@uncomputable uncomputable deleted the types branch November 28, 2023 08:26
@uncomputable
Copy link
Collaborator Author

Awesome, thanks. The red icon looks scary, but the merge is what counts.

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