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

Removed Send trait bound from argument binding #2960

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

bobozaur
Copy link
Contributor

@bobozaur bobozaur commented Jan 2, 2024

Initial PR that removes all the Send trait bounds from various argument binding methods. While the argument buffer makes sense to be Send as it might be passed around, arguments passed in are immediately encoded away, so it does not seem to be required for them to be Send.

The PR could be expanded to add an Encode impl for std::fmt::Arguments (the initial motivation for removing the bounds) and even make the Text adapter rely on it when getting encoded.

Fixes #2959

@abonander
Copy link
Collaborator

If you rebase, it should hopefully fix the error.

I don't disagree with removing the Send bound but it is a breaking change to the Arguments trait.

@bobozaur
Copy link
Contributor Author

bobozaur commented Jan 6, 2024

If you rebase, it should hopefully fix the error.

I don't disagree with removing the Send bound but it is a breaking change to the Arguments trait.

What do you think about adding an Encode impl for the std::fmt::Arguments type?

@bobozaur bobozaur force-pushed the no_send_arg_binding branch from a09571a to 884aee8 Compare January 6, 2024 07:24
@abonander abonander merged commit e0a1f16 into launchbadge:main Mar 14, 2024
64 checks passed
@abonander
Copy link
Collaborator

You can just wrap fmt::Arguments in Text()

@bobozaur bobozaur deleted the no_send_arg_binding branch March 14, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Send trait bounds from argument bind() calls
2 participants