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
Provide the hex encoding utilities on Sequences #2249
Merged
Merged
Conversation
This file contains 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
…Sequence instead of restricting them to Collection. - Make `hexEncodedBytes()` public, why wouldn't it be? - Specialize `hexEncodedBytes()` on `Collection` to use a (theoretically) more efficient method. It's probably a completely unmeasurable difference in practice. - Add unit test to make sure it works on `Sequence`s.
gwynne
requested review from
grosch,
tanner0101,
0xTim,
calebkleveter and
MrLotU
March 17, 2020 18:41
calebkleveter
approved these changes
Mar 17, 2020
These changes are now available in 4.0.0-rc.3.5 |
pull bot
pushed a commit
to scope-demo/vapor
that referenced
this pull request
Mar 17, 2020
…equence instead of restricting them to Collection. (vapor#2249) - Make `hexEncodedBytes()` public, why wouldn't it be? - Specialize `hexEncodedBytes()` on `Collection` to use a (theoretically) more efficient method. It's probably a completely unmeasurable difference in practice. - Add unit test to make sure it works on `Sequence`s.
nachoBonafonte
pushed a commit
to scope-demo/vapor
that referenced
this pull request
Mar 20, 2020
* Remove double quotes from cooke value (vapor#2215) * remove double quotes from cookie value * naming * naming * Expose initializer of Validator (vapor#2232) vapor#2231 Co-authored-by: seeppp <jonas.schoch@naptics.ch> * Allow WebSocket maxFrameSize to be configured (vapor#2195) * Allow WebSocket maxFrameSize to be configured. * Change maxFrameSize to an enum instead of optional. * Implement `.hex`, `hexEncodedString()`, and `hexEncodedBytes()` on Sequence instead of restricting them to Collection. (vapor#2249) - Make `hexEncodedBytes()` public, why wouldn't it be? - Specialize `hexEncodedBytes()` on `Collection` to use a (theoretically) more efficient method. It's probably a completely unmeasurable difference in practice. - Add unit test to make sure it works on `Sequence`s. Co-authored-by: Tanner <tannernelson@gmail.com> Co-authored-by: Seeppp <jonas.schoch@icloud.com> Co-authored-by: seeppp <jonas.schoch@naptics.ch> Co-authored-by: Bridger Maxwell <bridger.maxwell@gmail.com> Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
nachoBonafonte
pushed a commit
to scope-demo/vapor
that referenced
this pull request
Mar 23, 2020
* Remove double quotes from cooke value (vapor#2215) * remove double quotes from cookie value * naming * naming * Expose initializer of Validator (vapor#2232) vapor#2231 Co-authored-by: seeppp <jonas.schoch@naptics.ch> * Allow WebSocket maxFrameSize to be configured (vapor#2195) * Allow WebSocket maxFrameSize to be configured. * Change maxFrameSize to an enum instead of optional. * Implement `.hex`, `hexEncodedString()`, and `hexEncodedBytes()` on Sequence instead of restricting them to Collection. (vapor#2249) - Make `hexEncodedBytes()` public, why wouldn't it be? - Specialize `hexEncodedBytes()` on `Collection` to use a (theoretically) more efficient method. It's probably a completely unmeasurable difference in practice. - Add unit test to make sure it works on `Sequence`s. * close mode output keep-alive (vapor#2257) * fix body stream leak (vapor#2258) Co-authored-by: Tanner <tannernelson@gmail.com> Co-authored-by: Seeppp <jonas.schoch@icloud.com> Co-authored-by: seeppp <jonas.schoch@naptics.ch> Co-authored-by: Bridger Maxwell <bridger.maxwell@gmail.com> Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
nachoBonafonte
pushed a commit
to scope-demo/vapor
that referenced
this pull request
Mar 24, 2020
* Remove double quotes from cooke value (vapor#2215) * remove double quotes from cookie value * naming * naming * Expose initializer of Validator (vapor#2232) vapor#2231 Co-authored-by: seeppp <jonas.schoch@naptics.ch> * Allow WebSocket maxFrameSize to be configured (vapor#2195) * Allow WebSocket maxFrameSize to be configured. * Change maxFrameSize to an enum instead of optional. * Implement `.hex`, `hexEncodedString()`, and `hexEncodedBytes()` on Sequence instead of restricting them to Collection. (vapor#2249) - Make `hexEncodedBytes()` public, why wouldn't it be? - Specialize `hexEncodedBytes()` on `Collection` to use a (theoretically) more efficient method. It's probably a completely unmeasurable difference in practice. - Add unit test to make sure it works on `Sequence`s. * close mode output keep-alive (vapor#2257) * fix body stream leak (vapor#2258) Co-authored-by: Tanner <tannernelson@gmail.com> Co-authored-by: Seeppp <jonas.schoch@icloud.com> Co-authored-by: seeppp <jonas.schoch@naptics.ch> Co-authored-by: Bridger Maxwell <bridger.maxwell@gmail.com> Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
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.
hexEncodedBytes()
public, why wouldn't it be?hexEncodedBytes()
onCollection
to use a (theoretically) more efficient method. It's probably a completely unmeasurable difference in practice.Sequence
s properly. (Sure, it crashes if you try something likesequence(0) { $0 + 1 }.hex
, but that's to be expected. Maybe at some point a length limit check can be added.)