mirror of
https://github.com/apple/swift-crypto
synced 2026-11-24 04:37:48 +00:00
### Motivation: Tending the garden. This repo only supports Swift 6.2+ these days, but we have some code that conditionally compiles based on compiler versions that are either always false or always true. ### Modifications: - Remove any pre-6.2 compiler check. ### Result: Removing dead code.
28 lines
832 B
Swift
28 lines
832 B
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftCrypto open source project
|
|
//
|
|
// Copyright (c) 2025 Apple Inc. and the SwiftCrypto project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftCrypto project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#if canImport(FoundationEssentials)
|
|
import FoundationEssentials
|
|
#else
|
|
import Foundation
|
|
#endif
|
|
|
|
extension Data {
|
|
// This overload reduces allocations when used in a chain of infix operations.
|
|
static func + (lhs: consuming Data, rhs: consuming Data) -> Data {
|
|
lhs.append(contentsOf: rhs)
|
|
return lhs
|
|
}
|
|
}
|