Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
test: serialisation round trip testing for
OpDef
#999test: serialisation round trip testing for
OpDef
#999Changes from 7 commits
f523fc9
1011e7a
7418e37
6e425d8
979103a
a5baf1f
7774f92
3d9dbb0
d9687e7
be8e408
96dc36b
5756599
5e22501
54b100e
0f1af4c
30a6d05
cdd82c1
cab398c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super-nit:
pub(super)
might have less possibility of misleading the readerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be appropriate to expect these to be
None
as a SimpleOpDef should not be created otherwiseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created
SimpleOpDef::new
which asserts that all the banned constructions are absent.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super-nit: I'd inline
signature_func
andlower_func
, they are barely shorter than their definitionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
element
->child
maybe? It's the recursive call right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could, this is copy-pasted from the docs though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and
contents
is the result of that recursive call (soelem_strat
andelem
, perhaps, orchild_strat
andchild
?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it plausible to break this lambda
|(value, c)| ....
out into a function with a name and a type signature? It feels like it could be anany_something_with
function (_with
as it takes a couple of parameters)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite sure what you mean. I don't think you can extract anything useful here. Happy to add a comment to explain what's going on.