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

chore: replace nested matches in noirc_abi #1670

Merged
merged 2 commits into from
Jun 14, 2023
Merged

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Reduces diff for #1651

Summary*

In noirc_abi we often require some knowledge about the value being used as well as the expected type which it is supposed to be. We currently handle this by using nested match statements however this is a little unwieldy.

This PR replaces these with a single level match statement over a tuple of (value, type).

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@TomAFrench TomAFrench added this pull request to the merge queue Jun 14, 2023
Merged via the queue into master with commit e299b5c Jun 14, 2023
@TomAFrench TomAFrench deleted the rework-matches-in-abi branch June 14, 2023 04:56
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