- Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathUnsafeTransfer.swift
19 lines (17 loc) · 661 Bytes
/
UnsafeTransfer.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Async Algorithms open source project
//
// Copyright (c) 2024 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
/// A wrapper struct to unconditionally to transfer an non-Sendable value.
structUnsafeTransfer<Element>:@uncheckedSendable{
letwrapped:Element
init(_ wrapped:Element){
self.wrapped = wrapped
}
}