From 5c10715c38cc24673f6eaf6c40bcd6b7724c8345 Mon Sep 17 00:00:00 2001 From: Gus Cairo Date: Tue, 1 Nov 2022 09:48:19 +0000 Subject: [PATCH] Add SwiftProtobufContiguousBytes protocol placeholder - Move SwiftProtobufContiguousBytes to SwiftProtobufCore (it was mistakenly added to SwiftProtobufFoundationCompat earlier) - Added a placeholder for extending Data with SwiftProtobufContiguousBytes conformance in SwiftProtobufFoundationCompat --- .../SwiftProtobufContiguousBytes.swift | 2 +- .../Data+SwiftProtobufContiguousBytes.swift | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) rename Sources/{SwiftProtobufFoundationCompat => SwiftProtobufCore}/SwiftProtobufContiguousBytes.swift (89%) create mode 100644 Sources/SwiftProtobufFoundationCompat/Data+SwiftProtobufContiguousBytes.swift diff --git a/Sources/SwiftProtobufFoundationCompat/SwiftProtobufContiguousBytes.swift b/Sources/SwiftProtobufCore/SwiftProtobufContiguousBytes.swift similarity index 89% rename from Sources/SwiftProtobufFoundationCompat/SwiftProtobufContiguousBytes.swift rename to Sources/SwiftProtobufCore/SwiftProtobufContiguousBytes.swift index 026edd31e5..f180bb4ec4 100644 --- a/Sources/SwiftProtobufFoundationCompat/SwiftProtobufContiguousBytes.swift +++ b/Sources/SwiftProtobufCore/SwiftProtobufContiguousBytes.swift @@ -1,4 +1,4 @@ -// Sources/SwiftProtobuf/SwiftProtobufContiguousBytes.swift +// Sources/SwiftProtobufCore/SwiftProtobufContiguousBytes.swift // // Copyright (c) 2022 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception diff --git a/Sources/SwiftProtobufFoundationCompat/Data+SwiftProtobufContiguousBytes.swift b/Sources/SwiftProtobufFoundationCompat/Data+SwiftProtobufContiguousBytes.swift new file mode 100644 index 0000000000..14afd81520 --- /dev/null +++ b/Sources/SwiftProtobufFoundationCompat/Data+SwiftProtobufContiguousBytes.swift @@ -0,0 +1,16 @@ +// Sources/SwiftProtobufFoundationCompat/Data+SwiftProtobufContiguousBytes.swift +// +// Copyright (c) 2022 Apple Inc. and the project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See LICENSE.txt for license information: +// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt +// +// ----------------------------------------------------------------------------- + +import Foundation +import SwiftProtobufCore + +/// Extension conforming `Data` to the new `SwiftProtobufContiguousBytes` protocol. +extension Data: SwiftProtobufContiguousBytes { +}