Skip to content

Commit

Permalink
[concurrency] conform Deque.Iterator uncheckedly to Sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
glessard committed Aug 20, 2024
1 parent 38602cf commit 73f45ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
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 {}

0 comments on commit 73f45ac

Please sign in to comment.