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

Provide the hex encoding utilities on Sequences #2249

Merged
merged 1 commit into from Mar 17, 2020

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented Mar 17, 2020

  • Might as well let Sequences have them as well as Collections
  • 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 Sequences properly. (Sure, it crashes if you try something like sequence(0) { $0 + 1 }.hex, but that's to be expected. Maybe at some point a length limit check can be added.)

…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 gwynne added enhancement New feature or request semver-minor Contains new API labels Mar 17, 2020
@gwynne gwynne self-assigned this Mar 17, 2020
@gwynne gwynne added this to Awaiting Review in Vapor 4 via automation Mar 17, 2020
@gwynne gwynne merged commit 57398eb into master Mar 17, 2020
Vapor 4 automation moved this from Awaiting Review to Done Mar 17, 2020
@gwynne gwynne deleted the public-hexencodedbytes branch March 17, 2020 19:55
@tanner0101
Copy link
Member

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
Labels
enhancement New feature or request semver-minor Contains new API
Projects
Vapor 4
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants