Skip to content

Commit 810d7a2

Browse files
committed
[stdlib] tweaks to MutableSpan
1 parent 97d4b42 commit 810d7a2

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

stdlib/public/core/Span/MutableSpan.swift

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,9 @@ extension MutableSpan where Element: ~Copyable {
497497
// source.count <= self.count,
498498
// "destination span cannot contain every element from source."
499499
// )
500-
// let buffer = source.relinquishBorrowedMemory()
500+
// let buffer = unsafe source.relinquishBorrowedMemory()
501501
// // we must now deinitialize the returned UMBP
502-
// _start().moveInitializeMemory(
502+
// unsafe _start().moveInitializeMemory(
503503
// as: Element.self, from: buffer.baseAddress!, count: buffer.count
504504
// )
505505
// return buffer.count
@@ -524,9 +524,7 @@ extension MutableSpan {
524524
public mutating func moveUpdate(
525525
fromContentsOf source: Slice<UnsafeMutableBufferPointer<Element>>
526526
) -> Index {
527-
unsafe moveUpdate(
528-
fromContentsOf: UnsafeMutableBufferPointer(rebasing: source)
529-
)
527+
moveUpdate(fromContentsOf: unsafe .init(rebasing: source))
530528
}
531529
}
532530

@@ -707,14 +705,6 @@ extension MutableSpan where Element: ~Copyable {
707705
///
708706
/// - Complexity: O(1)
709707
@unsafe
710-
@_alwaysEmitIntoClient
711-
@lifetime(borrow self)
712-
mutating public func _extracting(
713-
unchecked bounds: some RangeExpression<Index>
714-
) -> Self {
715-
unsafe _extracting(unchecked: bounds.relative(to: indices))
716-
}
717-
718708
@_alwaysEmitIntoClient
719709
@lifetime(borrow self)
720710
mutating public func _extracting(

0 commit comments

Comments
 (0)