Commit Graph
8 Commits
Author SHA1 Message Date
Rick Newton-Rogers adfd61adc5 Use Swift 6.0 docs pipeline (#2966)
### Motivation:

Documentation checking catches more issues in Swift 6.0.

### Modifications:

Adopt the Swift 6.0 image and fix the errors.

### Result:

More accurate docs.
2024-11-07 13:03:47 +00:00
Franz Busch c9756e1083 Adopt swift-format (#2794)
* Apply formatting

* Apply no block comments rule

* Apply OmitExplicitReturns

* Apple OnlyOneTrailingClosureArgument

* Apply NoAssignmentInExpressions

* Fix up DontRepeatTypeInStaticProperties lint errors

* Apply `OrderedImports`

* Apply `ReplaceForEachWithForLoop`

* format file

* Enable the formatting pipeline

* Adopt `AmbiguousTrailingClosureOverload`

* Fix license header

* Fix format check

* Fix `EndOfLineComment`

* Fix CI

* Adapt CI script to check if changes when running formatting

* Separate lint and format into to steps

* Fix format

* Adopt `UseEarlyExits`

* Revert "Adopt `UseEarlyExits`"

This reverts commit d1ac5bbe12.
2024-07-19 11:48:17 +02:00
Stepan UlyaninandCory Benfield d1814ea5cf replace the double encoding by writing bytes directly to the buffer (#2043)
Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-02-08 23:41:13 -08:00
Cory BenfieldandGeorge Barnett 64285cbff2 Clean up dependencies and imports. (#1935)
Motivation:

As we've largely completed our move to split out our core abstractions,
we now have an opportunity to clean up our dependencies and imports. We
should arrange for everything to only import NIO if it actually needs
it, and to correctly express dependencies on NIOCore and NIOEmbedded
where they exist.

We aren't yet splitting out tests that only test functionality in
NIOCore, that will follow in a separate patch.

Modifications:

- Fixed up imports
- Made sure our protocols only require NIOCore.

Result:

Better expression of dependencies.

Co-authored-by: George Barnett <gbarnett@apple.com>
2021-08-12 13:49:46 +01:00
Peter Tolsma 3f33ef369f Make ByteBuffer unconditionally use zero-copy for JSON Decoding (#1889) 2021-07-05 08:05:16 +01:00
Johannes Weiss e572cf42c4 ByteBuffer: readJSONDecodable: use specified decoder (#1228)
Motivation:

ByteBuffer.readJSONDecodable just ignored the JSONDecoder that got
passed in.

Modifications:

Pass through the JSONDecoder that was specified.

Result:

Respect the user's choices.
2019-11-09 17:06:57 +00:00
Gwynne Raskind 1a9a543b6b Use self as the decoder when decoding a ByteBuffer (#1221)
Motivation:

JSONDecoder settings should be respected but were not.

Modifications:

This allows actually configuring the `JSONDecoder` instead of being stuck with the defaults.

Result:

Settings respected.
2019-11-06 16:08:31 +00:00
Johannes Weiss 8dd62cb068 ByteBuffer: add direct Codable support (#1153)
Motivation:

So far, it has been harder than necessary to use Codable & ByteBuffer.
These new APIs should simplify that and allow future optimisations.

Modifications:

Add new API to use `JSONEncoder` and `JSONDecoder` directly with
`ByteBuffer`.

Result:

Easier Codable + ByteBuffer usage.
2019-10-17 16:03:44 -07:00