post-rebase compatibility fixes

This commit is contained in:
Guillaume Lessard committed 2024-10-06 11:16:43 -07:00
1 parent dc63d5e048
commit 3f6522fef1
8 files changed
+20 -12

No files matched your search

@@ -13,6 +13,8 @@
import InternalCollectionsUtilities
#endif
import Future
extension Deque {
// Implementation note: we could also use the default `IndexingIterator` here.
// This custom implementation performs direct storage access to eliminate any
@@ -9,6 +9,8 @@
//
//===----------------------------------------------------------------------===//
import Future
extension Deque: Equatable where Element: Equatable {
/// Returns a Boolean value indicating whether two values are equal. Two
/// deques are considered equal if they contain the same elements in the same
+2
View File
@@ -9,6 +9,8 @@
//
//===----------------------------------------------------------------------===//
import Future
/// A collection implementing a double-ended queue. `Deque` (pronounced "deck")
/// implements an ordered random-access collection that supports efficient
/// insertions and removals from both ends.
+3 -3
View File
@@ -95,16 +95,16 @@ public struct _DequeBorrowingIterator<Element: ~Copyable>: BorrowingIteratorProt
let d = Swift.min(maximumCount, _segments.first.count - _offset)
let slice = _segments.first.extracting(_offset ..< _offset + d)
_offset += d
return Span(unsafeElements: slice, owner: self)
return Span(_unsafeElements: slice)
}
guard let second = _segments.second else {
return Span(unsafeElements: UnsafeBufferPointer._empty, owner: self)
return Span(_unsafeElements: UnsafeBufferPointer._empty)
}
let o = _offset - _segments.first.count
let d = Swift.min(maximumCount, second.count - o)
let slice = second.extracting(o ..< o + d)
_offset += d
return Span(unsafeElements: slice, owner: self)
return Span(_unsafeElements: slice)
}
}