Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'DevinAI' or '@devin'.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5792. Closes #5839 (supersedes it with an allocation-free approach).
Routable's generatedDisplayimpl unconditionally wrote?before the query segment, so a route like/doc/:id?:folderwithfolder: Nonerendered as/doc/abc?. It also wrote&after every non-empty, non-final argument regardless of what followed, so/r?:a&:bwitha: Some(1), b: Nonerendered as/r?a=1&.The generated code now tracks a single
booland emits the separator lazily, only in front of arguments that actually produced output:The
?:..params(FullQuerySegment) path gets the sameis_empty()guard. No new allocations; thetrailingparameter onQueryArgument::writeis gone since position no longer matters.Test covers the full-query path, plus a two-argument route with every combination of present/absent arguments, round-tripping through
from_str.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/2a0f4275713d441fb98a3b8b8d7f63a4
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/2a0f4275713d441fb98a3b8b8d7f63a4?variant=devin-insiders
Requested by: @nicoburns