mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
This commit is contained in:
@@ -44,7 +44,7 @@ extension String {
|
||||
}
|
||||
mutating func next() -> UTF16.CodeUnit? {
|
||||
if idx == core.endIndex {
|
||||
return .None
|
||||
return nil
|
||||
}
|
||||
return self.core[idx++]
|
||||
}
|
||||
@@ -174,7 +174,7 @@ extension String {
|
||||
switch self._asciiBase.next() {
|
||||
case let x?:
|
||||
result = .Result(UnicodeScalar(x))
|
||||
case .None:
|
||||
case nil:
|
||||
result = .EmptyInput
|
||||
}
|
||||
} else {
|
||||
@@ -187,7 +187,7 @@ extension String {
|
||||
case .Result(let us):
|
||||
return us
|
||||
case .EmptyInput:
|
||||
return .None
|
||||
return nil
|
||||
case .Error:
|
||||
return UnicodeScalar(0xfffd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user