mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[stdlib] all sorts of require renamed back to precondition
This commit is contained in:
@@ -70,7 +70,7 @@ func nthUnicodeScalar(n: UInt32) -> UnicodeScalar {
|
||||
return UnicodeScalar(r.endIndex - (count - n))
|
||||
}
|
||||
}
|
||||
_requirementFailure("Index out of range")
|
||||
_preconditionFailure("Index out of range")
|
||||
}
|
||||
|
||||
// `buffer` should have a length >= 4
|
||||
@@ -81,7 +81,7 @@ func nsEncode<CodeUnit>(
|
||||
inout _ used: Int
|
||||
) {
|
||||
var c = c
|
||||
_require(buffer.count >= 4, "buffer is not large enough")
|
||||
_precondition(buffer.count >= 4, "buffer is not large enough")
|
||||
|
||||
let s = NSString(
|
||||
bytes: &c,
|
||||
|
||||
Reference in New Issue
Block a user