_precondition => _require

This commit is contained in:
Maxim Moiseev
2015-11-09 15:43:15 -08:00
committed by Max Moiseev
parent f2f50d6a9d
commit e6468a0eca
70 changed files with 290 additions and 290 deletions

View File

@@ -63,7 +63,7 @@ func nthUnicodeScalar(n: UInt32) -> UnicodeScalar {
return UnicodeScalar(r.endIndex - (count - n))
}
}
_preconditionFailure("Index out of range")
_requirementFailure("Index out of range")
}
// `buffer` should have a length >= 4
@@ -74,7 +74,7 @@ func nsEncode<CodeUnit>(
inout _ used: Int
) {
var c = c
_precondition(buffer.count >= 4, "buffer is not large enough")
_require(buffer.count >= 4, "buffer is not large enough")
let s = NSString(
bytes: &c,