Skip to content

Commit

Permalink
Merge pull request #414 from glessard/rdar134300306
Browse files Browse the repository at this point in the history
[concurrency] conform Deque.Iterator to unchecked-Sendable
  • Loading branch information
glessard authored Aug 20, 2024
2 parents 38602cf + 0f138be commit 9bf03ff
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 18 deletions.
1 change: 0 additions & 1 deletion Sources/DequeModule/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ target_sources(${module_name} PRIVATE
"Deque+ExpressibleByArrayLiteral.swift"
"Deque+Extras.swift"
"Deque+Hashable.swift"
"Deque+Sendable.swift"
"Deque+Testing.swift"
"Deque._Storage.swift"
"Deque._UnsafeHandle.swift"
Expand Down
2 changes: 1 addition & 1 deletion Sources/DequeModule/Deque+Collection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions Sources/DequeModule/Deque+Sendable.swift

This file was deleted.

2 changes: 2 additions & 0 deletions Sources/DequeModule/Deque.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@ public struct Deque<Element> {
self._storage = _Storage(minimumCapacity: minimumCapacity)
}
}

extension Deque: @unchecked Sendable where Element: Sendable {}
4 changes: 0 additions & 4 deletions Xcode/Collections.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
7DE9205129CA70F3004483EB /* Deque+Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE91EBD29CA70F3004483EB /* Deque+Hashable.swift */; };
7DE9205229CA70F3004483EB /* _UnsafeWrappedBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE91EBE29CA70F3004483EB /* _UnsafeWrappedBuffer.swift */; };
7DE9205329CA70F3004483EB /* _DequeBufferHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE91EBF29CA70F3004483EB /* _DequeBufferHeader.swift */; };
7DE9205429CA70F3004483EB /* Deque+Sendable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE91EC029CA70F3004483EB /* Deque+Sendable.swift */; };
7DE9205529CA70F3004483EB /* Deque+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE91EC129CA70F3004483EB /* Deque+Codable.swift */; };
7DE9205629CA70F3004483EB /* Deque+Testing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE91EC229CA70F3004483EB /* Deque+Testing.swift */; };
7DE9205829CA70F3004483EB /* Deque._UnsafeHandle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE91EC429CA70F3004483EB /* Deque._UnsafeHandle.swift */; };
Expand Down Expand Up @@ -525,7 +524,6 @@
7DE91EBD29CA70F3004483EB /* Deque+Hashable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Deque+Hashable.swift"; sourceTree = "<group>"; };
7DE91EBE29CA70F3004483EB /* _UnsafeWrappedBuffer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = _UnsafeWrappedBuffer.swift; sourceTree = "<group>"; };
7DE91EBF29CA70F3004483EB /* _DequeBufferHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = _DequeBufferHeader.swift; sourceTree = "<group>"; };
7DE91EC029CA70F3004483EB /* Deque+Sendable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Deque+Sendable.swift"; sourceTree = "<group>"; };
7DE91EC129CA70F3004483EB /* Deque+Codable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Deque+Codable.swift"; sourceTree = "<group>"; };
7DE91EC229CA70F3004483EB /* Deque+Testing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Deque+Testing.swift"; sourceTree = "<group>"; };
7DE91EC329CA70F3004483EB /* DequeModule.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = DequeModule.docc; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1070,7 +1068,6 @@
7DE91EC729CA70F3004483EB /* Deque+ExpressibleByArrayLiteral.swift */,
7DE91EC629CA70F3004483EB /* Deque+Extras.swift */,
7DE91EBD29CA70F3004483EB /* Deque+Hashable.swift */,
7DE91EC029CA70F3004483EB /* Deque+Sendable.swift */,
7DE91EC229CA70F3004483EB /* Deque+Testing.swift */,
7DE91EC329CA70F3004483EB /* DequeModule.docc */,
7DE91EB929CA70F3004483EB /* CMakeLists.txt */,
Expand Down Expand Up @@ -2161,7 +2158,6 @@
7DE9216329CA70F4004483EB /* _HashLevel.swift in Sources */,
7D9B859729E4F74400B291CD /* BitArray+Shifts.swift in Sources */,
7DE9216C29CA70F4004483EB /* TreeDictionary+Descriptions.swift in Sources */,
7DE9205429CA70F3004483EB /* Deque+Sendable.swift in Sources */,
7DE920A229CA70F4004483EB /* Rope+RemoveSubrange.swift in Sources */,
7DE920C729CA70F4004483EB /* BitSet+ExpressibleByArrayLiteral.swift in Sources */,
7DE9214929CA70F4004483EB /* _HashNode+Structural isEqualSet.swift in Sources */,
Expand Down

0 comments on commit 9bf03ff

Please sign in to comment.