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

Refactor encode_action_body #3822

Open
bernardnormier opened this issue Nov 30, 2023 · 1 comment
Open

Refactor encode_action_body #3822

bernardnormier opened this issue Nov 30, 2023 · 1 comment

Comments

@bernardnormier
Copy link
Member

This code:

fn encode_action_body(

should be simplified. It's confusing to compute value and then most of the time not use it but instead hardcode "value".

It would be nice to add some comments too. For example, explain why we create this strange helper variable:

let is_optional = type_ref.is_optional && !is_tagged;
@InsertCreativityHere
Copy link
Member

This function got some simplification in #3916.
There is still more opportunity for simplification, but it would require untangling the other functions that call into it first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants