mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SE-0138: Minor update. Array.withUnsafeBytes is nonmutating.
The "mutating" keyword should not have been on this API. The example code in SE-0138 uses it as a nonmutating API. (The mutating keyword was a temporary workaround that should never have been carried over to the swift-3.0-branch). <rdar://28614519> [swift-3.0-branch] Remove "mutating" keyword from Array.withUnsafeBytes
This commit is contained in:
@@ -2170,7 +2170,7 @@ extension ${Self} {
|
||||
/// - Returns: The return value of the `body` closure parameter, if any.
|
||||
///
|
||||
/// - SeeAlso: `withUnsafeBytes`, `UnsafeRawBufferPointer`
|
||||
public mutating func withUnsafeBytes<R>(
|
||||
public func withUnsafeBytes<R>(
|
||||
_ body: (UnsafeRawBufferPointer) throws -> R
|
||||
) rethrows -> R {
|
||||
return try self.withUnsafeBufferPointer {
|
||||
|
||||
Reference in New Issue
Block a user