Skip to content

Commit dc95688

Browse files
committed
Suppress a 'was never mutated' warning in MEBuiltins.swift.
1 parent 4533a27 commit dc95688

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/_StringProcessing/Engine/MEBuiltins.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,10 @@ extension String {
297297
) -> String.Index? {
298298
// TODO: Branch here on scalar semantics
299299
// Don't want to pay character cost if unnecessary
300-
guard var (char, next) =
300+
guard let (char, nextIndex) =
301301
characterAndEnd(at: currentPosition, limitedBy: end)
302302
else { return nil }
303+
var next = nextIndex
303304
let scalar = unicodeScalars[currentPosition]
304305

305306
let asciiCheck = !isStrictASCII

0 commit comments

Comments
 (0)