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

Mutable reference to Request queries #391

Closed
lostb1t opened this issue Aug 30, 2023 · 0 comments
Closed

Mutable reference to Request queries #391

lostb1t opened this issue Aug 30, 2023 · 0 comments

Comments

@lostb1t
Copy link
Contributor

lostb1t commented Aug 30, 2023

This is a bit of an edge case. But I heavily use the proxy functionality of salvo. And with that a lot of editing of the incoming Request queries. Now I could use the mutable uri field but it’s a pain to work with. The queries multimap that salvo provides on the Request struct has a nicer interface. But it’s not mutabele.

is it possible to get a mutable reference to it?

*req.queries_mut() = new_queries

chrislearn added a commit that referenced this issue Aug 30, 2023
* chore: cargo clippy

* chore: cargo clippy

* wip

* wip

* Format Rust code using rustfmt

* wip

* Format Rust code using rustfmt

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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

No branches or pull requests

2 participants