Bugfix, route prefix was always set to false after calling nest#702
Merged
yoshuawuyts merged 1 commit intohttp-rs:mainfrom Sep 27, 2020
Merged
Conversation
Member
|
Thanks so much for this PR! Yeah this is indeed a great fix! A regression test would be great though, as this is an easy thing to miss. Also if we could split 3d41fb9 from 2ad051a into separate patches that'd be greatly appreciated. Also we've fixed the tests on main, which means 3a25c85 is no longer needed. |
3d41fb9 to
75e2df0
Compare
Contributor
Author
75e2df0 to
a138f20
Compare
Contributor
Author
|
Hmm.. I looked at testing this, but don't see how to do that the way tests are set up. The prefix flags is not accessible from outside the Route struct and to test this we need to call the unstable |
yoshuawuyts
approved these changes
Sep 27, 2020
Member
yoshuawuyts
left a comment
There was a problem hiding this comment.
It's okay if we can't test it; happy enough to merge this as-is. Thanks heaps!
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.
Description
I found this method in route.rs:
I'm not sure if this is expected behavior but I assume that if self.prefix was set to true before calling
nestit should stay true.How Has This Been Tested?
This is a trivial code change, all tests still pass, however I could try to add a regression test for this. Let me know if this is required
Types of changes
This does introduce a small change in behavior but it only impacts code that uses the unstable
strip-prefixmethodChecklist: