Merge remote-tracking branch 'origin' into swift-3-api-guidelines

This commit is contained in:
Max Moiseev
2015-12-14 12:05:35 -08:00
638 changed files with 3342 additions and 2349 deletions

View File

@@ -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)
}