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:
@@ -301,7 +301,7 @@ extension String.UnicodeScalarIndex {
|
||||
|
||||
if utf16Index != utf16.startIndex
|
||||
&& utf16Index != utf16.endIndex {
|
||||
_require(
|
||||
_precondition(
|
||||
utf16Index >= utf16.startIndex
|
||||
&& utf16Index <= utf16.endIndex,
|
||||
"Invalid String.UTF16Index for this UnicodeScalar view")
|
||||
@@ -329,7 +329,7 @@ extension String.UnicodeScalarIndex {
|
||||
) {
|
||||
let core = unicodeScalars._core
|
||||
|
||||
_require(
|
||||
_precondition(
|
||||
utf8Index._coreIndex >= 0 && utf8Index._coreIndex <= core.endIndex,
|
||||
"Invalid String.UTF8Index for this UnicodeScalar view")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user