mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
||||
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
|
||||
// Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
//
|
||||
// See http://swift.org/LICENSE.txt for license information
|
||||
@@ -51,7 +51,7 @@ extension String {
|
||||
/// that is the target of this method) during the execution of
|
||||
/// `body`: it may not appear to have its correct value. Instead,
|
||||
/// use only the `String.CharacterView` argument to `body`.
|
||||
public mutating func withMutableCharacters<R>(body: (inout CharacterView)->R) -> R {
|
||||
public mutating func withMutableCharacters<R>(body: (inout CharacterView) -> R) -> R {
|
||||
// Naively mutating self.characters forces multiple references to
|
||||
// exist at the point of mutation. Instead, temporarily move the
|
||||
// core of this string into a CharacterView.
|
||||
|
||||
Reference in New Issue
Block a user