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

accept refs for the sort datatype accessor #113

Merged
merged 1 commit into from Dec 7, 2020
Merged

accept refs for the sort datatype accessor #113

merged 1 commit into from Dec 7, 2020

Conversation

sameer
Copy link
Collaborator

@sameer sameer commented Dec 6, 2020

this makes re-using a particular sort with accessors easier, since it
can just be referenced in the builder:

(psuedocode)

let some_complex_sort = Sort::set(&ctx, &Sort::set(...));
let datatype_using_that_sort = DatatypeBuilder::new(&ctx, "foo")
.variant("first", vec![("bar", &some_complex_sort)])
.variant("second", vec![("bar", &some_complex_sort), ("count", &Sort::int(&ctx))])
.finish();

It is backwards incompatible -- users of the builder would need to add a reference. Also, if the builder is not finish-ed immediately, the sort needs a let binding.

this makes re-using a particular sort with accessors easier, since it
can just be referenced in the builder
Copy link
Contributor

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks!

@fitzgen fitzgen merged commit f068b7b into prove-rs:master Dec 7, 2020
@fitzgen
Copy link
Contributor

fitzgen commented Dec 7, 2020

Do you have any other updates like this incoming that I should wait for, or should I cut a release now?

@sameer
Copy link
Collaborator Author

sameer commented Dec 14, 2020

Sorry for the delay, I missed seeing the email notification for this. Looks like there are a few other changes on the way from others, nothing from me though. I can help out and review if needed.

@sameer sameer deleted the sort_accessor_ref branch December 14, 2020 00:15
sameer pushed a commit that referenced this pull request Apr 7, 2021
This reverts commit f068b7b, reversing
changes made to be520f0.
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

2 participants