Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conform CircularBuffer to ExpressibleByArrayLiteral
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