Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

feat: allow updating an empty CRS buffer #204

Closed
wants to merge 1 commit into from

Conversation

TomAFrench
Copy link
Member

@TomAFrench TomAFrench requested a review from phated May 19, 2023 07:55
Base automatically changed from acvm-0.12.0 to master May 19, 2023 12:29
Copy link
Contributor

@phated phated left a comment

Choose a reason for hiding this comment

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

From a caller/callee perspective, I think it's wrong to ever call the update function with an empty vector. The reason that an empty vector is used in Nargo is to make the type system happy; otherwise we'd be dealing with options in a lot of places I didn't want to.

There may be a case for only having a get_or_update_crs API but that'd take an Option for CRS and the is_empty check would still need to exist in Nargo.

@TomAFrench
Copy link
Member Author

True, an Option is the way to go if we want to merge these two methods. Can revisit in a later rework of these traits.

@TomAFrench TomAFrench closed this May 22, 2023
@TomAFrench TomAFrench deleted the graceful-empty-crs-update branch May 22, 2023 16:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants