@@ -17,7 +17,7 @@ extension UTF8Span {
17
17
///
18
18
/// `i` must be scalar-aligned.
19
19
internal func _previousScalarStart( _ i: Int ) -> Int {
20
- precondition ( _boundsCheck ( i&- 1 ) )
20
+ _precondition ( _boundsCheck ( i&- 1 ) )
21
21
return _previousScalarStart ( unchecked: i)
22
22
}
23
23
@@ -31,7 +31,7 @@ extension UTF8Span {
31
31
/// this is an unsafe operation.
32
32
internal func _previousScalarStart( unchecked i: Int ) -> Int {
33
33
_internalInvariant ( _boundsCheck ( i&- 1 ) )
34
- precondition ( _isScalarAligned ( unchecked: i) )
34
+ _precondition ( _isScalarAligned ( unchecked: i) )
35
35
return _previousScalarStart ( uncheckedAssumingAligned: i)
36
36
}
37
37
@@ -81,7 +81,7 @@ extension UTF8Span {
81
81
internal func _decodePreviousScalar(
82
82
_ i: Int
83
83
) -> ( Unicode . Scalar , previousScalarStart: Int ) {
84
- precondition ( _boundsCheck ( i &- 1 ) )
84
+ _precondition ( _boundsCheck ( i &- 1 ) )
85
85
return _decodePreviousScalar ( unchecked: i)
86
86
}
87
87
@@ -96,7 +96,7 @@ extension UTF8Span {
96
96
unchecked i: Int
97
97
) -> ( Unicode . Scalar , previousScalarStart: Int ) {
98
98
_internalInvariant ( _boundsCheck ( i &- 1 ) )
99
- precondition ( _isScalarAligned ( unchecked: i) )
99
+ _precondition ( _isScalarAligned ( unchecked: i) )
100
100
return _decodePreviousScalar ( uncheckedAssumingAligned: i)
101
101
}
102
102
@@ -127,7 +127,7 @@ extension UTF8Span {
127
127
internal func _scalarAlignBackwards( _ i: Int ) -> Int {
128
128
if i == count || i == 0 { return i }
129
129
130
- precondition ( _boundsCheck ( i) )
130
+ _precondition ( _boundsCheck ( i) )
131
131
return unsafe _start( ) . _scalarAlign ( i)
132
132
}
133
133
@@ -169,7 +169,7 @@ extension UTF8Span {
169
169
///
170
170
/// `i` must be `Character`-aligned.
171
171
internal func _nextCharacterStart( _ i: Int ) -> Int {
172
- precondition ( _boundsCheck ( i) )
172
+ _precondition ( _boundsCheck ( i) )
173
173
return _nextCharacterStart ( unchecked: i)
174
174
}
175
175
@@ -183,7 +183,7 @@ extension UTF8Span {
183
183
/// this is an unsafe operation.
184
184
internal func _nextCharacterStart( unchecked i: Int ) -> Int {
185
185
_internalInvariant ( _boundsCheck ( i) )
186
- precondition ( _isScalarAligned ( unchecked: i) )
186
+ _precondition ( _isScalarAligned ( unchecked: i) )
187
187
return _nextCharacterStart ( uncheckedAssumingAligned: i)
188
188
}
189
189
@@ -212,7 +212,7 @@ extension UTF8Span {
212
212
///
213
213
/// `i` must be `Character`-aligned.
214
214
internal func _previousCharacterStart( _ i: Int ) -> Int {
215
- precondition ( _boundsCheck ( i&- 1 ) )
215
+ _precondition ( _boundsCheck ( i&- 1 ) )
216
216
return _previousCharacterStart ( unchecked: i)
217
217
}
218
218
@@ -226,7 +226,7 @@ extension UTF8Span {
226
226
/// this is an unsafe operation.
227
227
internal func _previousCharacterStart( unchecked i: Int ) -> Int {
228
228
_internalInvariant ( _boundsCheck ( i&- 1 ) )
229
- precondition ( _isScalarAligned ( unchecked: i) )
229
+ _precondition ( _isScalarAligned ( unchecked: i) )
230
230
return _previousCharacterStart ( uncheckedAssumingAligned: i)
231
231
}
232
232
@@ -256,7 +256,7 @@ extension UTF8Span {
256
256
internal func _decodeNextCharacter(
257
257
_ i: Int
258
258
) -> ( Character , nextCharacterStart: Int ) {
259
- precondition ( _boundsCheck ( i) )
259
+ _precondition ( _boundsCheck ( i) )
260
260
return _decodeNextCharacter ( unchecked: i)
261
261
}
262
262
@@ -271,7 +271,7 @@ extension UTF8Span {
271
271
unchecked i: Int
272
272
) -> ( Character , nextCharacterStart: Int ) {
273
273
_internalInvariant ( _boundsCheck ( i) )
274
- precondition ( _isScalarAligned ( unchecked: i) )
274
+ _precondition ( _isScalarAligned ( unchecked: i) )
275
275
return _decodeNextCharacter ( uncheckedAssumingAligned: i)
276
276
}
277
277
@@ -299,7 +299,7 @@ extension UTF8Span {
299
299
///
300
300
/// `i` must be `Character`-aligned.
301
301
internal func _decodePreviousCharacter( _ i: Int ) -> ( Character , Int ) {
302
- precondition ( _boundsCheck ( i &- 1 ) )
302
+ _precondition ( _boundsCheck ( i &- 1 ) )
303
303
return _decodePreviousCharacter ( unchecked: i)
304
304
}
305
305
@@ -314,7 +314,7 @@ extension UTF8Span {
314
314
unchecked i: Int
315
315
) -> ( Character , Int ) {
316
316
_internalInvariant ( _boundsCheck ( i &- 1 ) )
317
- precondition ( _isScalarAligned ( unchecked: i) )
317
+ _precondition ( _isScalarAligned ( unchecked: i) )
318
318
return _decodePreviousCharacter ( uncheckedAssumingAligned: i)
319
319
}
320
320
0 commit comments