Skip to content

Patched out forcing references in query arguments#3899

Closed
Buzzec wants to merge 2 commits into
transact-rs:mainfrom
staratlasmeta:pactch-forced-reference-main
Closed

Patched out forcing references in query arguments#3899
Buzzec wants to merge 2 commits into
transact-rs:mainfrom
staratlasmeta:pactch-forced-reference-main

Conversation

@Buzzec
Copy link
Copy Markdown

@Buzzec Buzzec commented Jun 13, 2025

Is this a breaking change?

This is a breaking change, it makes arguments no longer forced to be references. Users will have to manually reference their arguments.

Reasoning

This allows returning owned values as part of outputs, such as a function that outputs a stream from a fetch call can have values that are passed to that function as args.

We are already using this patch in our large codebase as it allows for optimized returns for streams.

@abonander
Copy link
Copy Markdown
Collaborator

Users will have to manually reference their arguments.

This is a net negative for most usages. We deliberately designed the macros not to require manual references because that's really surprising compared to macros like println!(), etc.

This really needs to be a part of a larger conversation where we decide whether to drop the borrowing from Encode entirely.

@abonander abonander closed this Jul 2, 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.

2 participants