Skip to content

Commit 36d7824

Browse files
committed
Annotate some newly added unsafe expressions
1 parent 03f3733 commit 36d7824

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/Span/MutableSpan.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ extension MutableSpan where Element: BitwiseCopyable {
182182
@lifetime(self: copy self)
183183
set {
184184
_checkIndex(position)
185-
self[unchecked: position] = newValue
185+
unsafe self[unchecked: position] = newValue
186186
}
187187
}
188188

@@ -197,7 +197,7 @@ extension MutableSpan where Element: BitwiseCopyable {
197197
@lifetime(self: copy self)
198198
set {
199199
let elementOffset = position &* MemoryLayout<Element>.stride
200-
_start().storeBytes(of: newValue, toByteOffset: elementOffset, as: Element.self)
200+
unsafe _start().storeBytes(of: newValue, toByteOffset: elementOffset, as: Element.self)
201201
}
202202
}
203203
}

0 commit comments

Comments
 (0)