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

Fix output handling logic in graph.rs #2688

Closed
wants to merge 1 commit into from
Closed

Conversation

loloxwg
Copy link

@loloxwg loloxwg commented Jan 13, 2025

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

Provide links to relevant issues and dependent PRs.

Changes

Removed unnecessary conditional check for multiple outputs, streamlining the code. This change ensures consistent handling of output types and reduces complexity in the logic.

Testing

Describe how these changes have been tested.

Removed unnecessary conditional check for multiple outputs, streamlining the code. This change ensures consistent handling of output types and reduces complexity in the logic.
@loloxwg
Copy link
Author

loloxwg commented Jan 14, 2025

What has happened to CI? Can anyone assist me?

@antimora
Copy link
Collaborator

What has happened to CI? Can anyone assist me?

Forced to re-run the CI. Lets see.

@loloxwg
Copy link
Author

loloxwg commented Jan 15, 2025

What has happened to CI? Can anyone assist me?

Forced to re-run the CI. Lets see.

There are still errors.

@laggui
Copy link
Member

laggui commented Jan 15, 2025

Have you tested your changes locally? Looks like it produces incorrect code for some test cases (hence the CI failures).

@loloxwg
Copy link
Author

loloxwg commented Jan 16, 2025

sorry,I realized that the quote in the multiple_output branch includes a comma.

self.graph_output_types.iter().for_each(|output| {
let name = output.name();
let ty = output.ty();
if multiple_output {
output_type_def.extend(quote! {
#ty,
});
output_return_def.extend(quote! {
#name,
});
} else {
output_type_def.extend(quote! {
#ty
});
output_return_def.extend(quote! {
#name
});
}
});

@loloxwg
Copy link
Author

loloxwg commented Jan 16, 2025

sorry,I realized that the quote in the multiple_output branch includes a comma.

@loloxwg loloxwg closed this Jan 16, 2025
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.

3 participants