From 2cfa777013fca4172801e87138539cb8a2020a00 Mon Sep 17 00:00:00 2001 From: Johannes Weiss Date: Tue, 23 Apr 2019 18:41:49 +0100 Subject: [PATCH] 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 33ef9c15d..6213492c1 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 {