Skip to content

Commit da4eb3a

Browse files
authored
Merge pull request #37607 from 3405691582/AvoidCapacity
[concurrency] Avoid capacity in Deque on OpenBSD.
2 parents 63b6232 + 1c9d8d2 commit da4eb3a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

stdlib/public/Concurrency/Deque.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,13 @@ struct _Deque<Element> {
228228
let object = _Storage._DequeBuffer.create(
229229
minimumCapacity: minimumCapacity,
230230
makingHeaderWith: {
231-
_Storage._Header(
232-
capacity: $0.capacity,
231+
#if os(OpenBSD)
232+
let capacity = minimumCapacity
233+
#else
234+
let capacity = $0.capacity
235+
#endif
236+
return _Storage._Header(
237+
capacity: capacity,
233238
count: count,
234239
startSlot: .zero)
235240
})

0 commit comments

Comments
 (0)