Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stdlib/public/core/IntegerParsing.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ internal func _parseAsciiAsUIntMax(
let c = u16.first
if _fastPath(c != _ascii16("-")) {
let unsignedText
= c == _ascii16("+") ? unsafeUnwrap(u16.dropFirst()) : u16
= c == _ascii16("+") ? u16.dropFirst() : u16
return _parseUnsignedAsciiAsUIntMax(unsignedText, radix, maximum)
}
else {
Expand All @@ -99,7 +99,7 @@ internal func _parseAsciiAsIntMax(

// Drop any leading "-"
let negative = u16.first == _ascii16("-")
let absResultText = negative ? _unsafeUnwrap(u16.dropFirst()) : u16
let absResultText = negative ? u16.dropFirst() : u16

let absResultMax = UIntMax(bitPattern: maximum) + (negative ? 1 : 0)

Expand Down