mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[noescape by default] Proliferate @escaping
Adds an explicit @escaping throughout the standard library, validation test suite, and tests. This will be necessary as soon as noescape is the default for closure parameters.
This commit is contained in:
@@ -495,7 +495,7 @@ extension String {
|
||||
|
||||
/// Enumerates all the lines in a string.
|
||||
public func enumerateLines(
|
||||
invoking body: (line: String, stop: inout Bool) -> ()
|
||||
invoking body: @escaping (line: String, stop: inout Bool) -> ()
|
||||
) {
|
||||
_ns.enumerateLines {
|
||||
(line: String, stop: UnsafeMutablePointer<ObjCBool>)
|
||||
@@ -560,7 +560,7 @@ extension String {
|
||||
public func enumerateSubstrings(
|
||||
in range: Range<Index>,
|
||||
options opts: EnumerationOptions = [],
|
||||
_ body: (
|
||||
_ body: @escaping (
|
||||
substring: String?, substringRange: Range<Index>,
|
||||
enclosingRange: Range<Index>, inout Bool
|
||||
) -> ()
|
||||
|
||||
Reference in New Issue
Block a user