Please sign in to comment.
Conform CircularBuffer to ExpressibleByArrayLiteral (#1102)
Motivation: Making CircularBuffer conform to ExpressibleByArrayLiteral enables directly initializing it from an array literal, which can sometimes make its use simpler and more natural, for instance: foo.circularBuffer = [1,2,3] // vs `= CircularBuffer([1,2,3])` Foo(circularBuffer: [a, b, c]) // vs `: CircularBuffer([a, b, c])` This is consistent with other standard Swift collections, such as Set, as well as existing NIO types (eg: WebSocketMaskingKey). Modifications: Extend CircularBuffer to conform to ExpressibleByArrayLiteral Result: CircularBuffer can now be initialized from array literals
- Loading branch information...
Showing with 20 additions and 0 deletions.