Skip to content

Commit

Permalink
Mark retroactive conformances appropriately. (#2569)
Browse files Browse the repository at this point in the history
Motivation:

In nightly Swift, we now need to mark retroactive conformances when
they are intentional. These conformances are safe for us, so we can
safely suppress the warnings.

Modifications:

- Mark NIOFoundationCompat retroactive conformances.

Result:

Nightly builds work again
  • Loading branch information
Lukasa committed Oct 23, 2023
1 parent 1c20573 commit 86d05fb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Sources/NIOFoundationCompat/ByteBuffer-foundation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -375,18 +375,24 @@ extension ByteBufferAllocator {
}

// MARK: - Conformances
#if compiler(>=5.11)
extension ByteBufferView: @retroactive ContiguousBytes {}
extension ByteBufferView: @retroactive DataProtocol {}
extension ByteBufferView: @retroactive MutableDataProtocol {}
#else
extension ByteBufferView: ContiguousBytes {}
extension ByteBufferView: DataProtocol {}
extension ByteBufferView: MutableDataProtocol {}
#endif

extension ByteBufferView: DataProtocol {
extension ByteBufferView {
public typealias Regions = CollectionOfOne<ByteBufferView>

public var regions: CollectionOfOne<ByteBufferView> {
return .init(self)
}
}

extension ByteBufferView: MutableDataProtocol {}

// MARK: - Data
extension Data {

Expand Down

0 comments on commit 86d05fb

Please sign in to comment.