Revert "Implement SE-0118"

This commit is contained in:
Michael Gottesman
2016-07-18 16:44:58 -07:00
committed by GitHub
parent 3b378f7313
commit fc37603c5f
64 changed files with 348 additions and 380 deletions

View File

@@ -103,9 +103,7 @@ extension String {
/// - Parameter body: A closure that takes a character view as its argument.
/// - Returns: The return value of the `body` closure, if any, is the return
/// value of this method.
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.