diff --git a/Sources/DequeModule/Deque+Collection.swift b/Sources/DequeModule/Deque+Collection.swift index b56772cb4..8f4fa8b6c 100644 --- a/Sources/DequeModule/Deque+Collection.swift +++ b/Sources/DequeModule/Deque+Collection.swift @@ -164,7 +164,7 @@ extension Deque: Sequence { } } -extension Deque.Iterator: Sendable where Element: Sendable {} +extension Deque.Iterator: @unchecked Sendable where Element: Sendable {} extension Deque: RandomAccessCollection { public typealias Index = Int diff --git a/Sources/DequeModule/Deque+Sendable.swift b/Sources/DequeModule/Deque+Sendable.swift deleted file mode 100644 index 882e921e8..000000000 --- a/Sources/DequeModule/Deque+Sendable.swift +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the Swift Collections open source project -// -// Copyright (c) 2022 - 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 -// -//===----------------------------------------------------------------------===// - -extension Deque: @unchecked Sendable where Element: Sendable {} diff --git a/Sources/DequeModule/Deque.swift b/Sources/DequeModule/Deque.swift index 9d6667a36..a0576b94f 100644 --- a/Sources/DequeModule/Deque.swift +++ b/Sources/DequeModule/Deque.swift @@ -103,3 +103,5 @@ public struct Deque { self._storage = _Storage(minimumCapacity: minimumCapacity) } } + +extension Deque: @unchecked Sendable where Element: Sendable {}