We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03f3733 commit 36d7824Copy full SHA for 36d7824
stdlib/public/core/Span/MutableSpan.swift
@@ -182,7 +182,7 @@ extension MutableSpan where Element: BitwiseCopyable {
182
@lifetime(self: copy self)
183
set {
184
_checkIndex(position)
185
- self[unchecked: position] = newValue
+ unsafe self[unchecked: position] = newValue
186
}
187
188
@@ -197,7 +197,7 @@ extension MutableSpan where Element: BitwiseCopyable {
197
198
199
let elementOffset = position &* MemoryLayout<Element>.stride
200
- _start().storeBytes(of: newValue, toByteOffset: elementOffset, as: Element.self)
+ unsafe _start().storeBytes(of: newValue, toByteOffset: elementOffset, as: Element.self)
201
202
203
0 commit comments