From 2cfa777013fca4172801e87138539cb8a2020a00 Mon Sep 17 00:00:00 2001 From: Johannes Weiss Date: Tue, 23 Apr 2019 18:41:49 +0100 Subject: [PATCH 1/2] CircularBuffer.Index: remove bogus assert (#978) Motivation: CircularBuffer.Index was asserting that its size is the same as a word. Whilst that's true on 64-bit architectures, the assert itself is bogus and a left-over from development. Modifications: Remove bogus assert. Result: Better 32-bit support. --- Sources/NIO/CircularBuffer.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/NIO/CircularBuffer.swift b/Sources/NIO/CircularBuffer.swift index 33ef9c15dd..6213492c1f 100644 --- a/Sources/NIO/CircularBuffer.swift +++ b/Sources/NIO/CircularBuffer.swift @@ -80,9 +80,8 @@ public struct CircularBuffer: CustomStringConvertible { // if we can, we store the check for the backing here self._backingCheck = backingCount < Int(_UInt24.max) ? _UInt24(UInt32(backingCount)) : .max } - assert(MemoryLayout.size(ofValue: self) == MemoryLayout.size) } - + @inlinable public static func < (lhs: Index, rhs: Index) -> Bool { if lhs.isIndexGEQHeadIndex && rhs.isIndexGEQHeadIndex { From 902cf2eb4ef33aa8489c7a7c82e40ba9c768827c Mon Sep 17 00:00:00 2001 From: Johannes Weiss Date: Tue, 23 Apr 2019 20:21:16 +0100 Subject: [PATCH 2/2] README: fix outdated info (#979) Motivation: The link to swift.org linked to the Swift 5 development versions but now it's released. We also mentioned swift-nio-{http2,ssl,extras,transport-services} but we already mention them in a more prominent place. Modifications: Remove outdated/duped info. Result: Better readme --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index 61c9d66e10..7f36cfd678 100644 --- a/README.md +++ b/README.md @@ -149,15 +149,6 @@ Applications that need extremely high performance from their networking stack ma The core SwiftNIO repository will contain a few extremely important protocol implementations, such as HTTP, directly in tree. However, we believe that most protocol implementations should be decoupled from the release cycle of the underlying networking stack, as the release cadence is likely to be very different (either much faster or much slower). For this reason, we actively encourage the community to develop and maintain their protocol implementations out-of-tree. Indeed, some first-party SwiftNIO protocol implementations, including our TLS and HTTP/2 bindings, are developed out-of-tree! -## Useful Protocol Implementations - -The following projects contain useful protocol implementations that do not live in-tree in SwiftNIO: - -- bindings to OpenSSL-compatible libraries for TLS: [swift-nio-ssl](https://github.com/apple/swift-nio-ssl) -- HTTP/2 support for SwiftNIO: [swift-nio-http2](https://github.com/apple/swift-nio-http2) -- Network.framework support for SwiftNIO on iOS, tvOS and macOS: [swift-nio-transport-services](https://github.com/apple/swift-nio-transport-services) -- useful code around SwiftNIO: [swift-nio-extras](https://github.com/apple/swift-nio-extras) - ## Documentation - [API documentation](https://apple.github.io/swift-nio/docs/current/NIO/index.html) @@ -254,7 +245,7 @@ have a few prerequisites installed on your system. ### Linux -- Swift 5.0 from [swift.org/download](https://swift.org/download/#swift-50-development). +- Swift 5.0 from [swift.org/download](https://swift.org/download/#releases). - netcat (for integration tests only) - lsof (for integration tests only) - shasum (for integration tests only)