mirror of
https://github.com/apple/swift-nio
synced 2026-11-30 05:28:44 +00:00
Motivation: In general, Swift collections and sequences automatically conforms to Equatable and Hashable when their Element conforms to Equatable and Hashhable, respectively. This wasn't the case of CircularBuffer, which was unintuitive and could cause useless boilerplate code. Modifications: CircularBuffer has been extended so that it conforms to Equatable when its Element is Equatable, and to Hashable when its element is Hashable. Corresponding test cases have been added. Result: Appropriate conditional conformances of CircularBuffer to Equatable and Hashable