mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] all sorts of require renamed back to precondition
This commit is contained in:
@@ -507,7 +507,7 @@ public struct ${Self} : ${Traversal}Index {
|
||||
internal var _box: _${Traversal}IndexBoxProtocol
|
||||
|
||||
public func _distance(to other: ${Self}) -> ${Self}.Distance {
|
||||
require(
|
||||
precondition(
|
||||
self._typeID == other._typeID,
|
||||
"distance: base index types differ.")
|
||||
return self._box._distance(to: other._box)
|
||||
@@ -521,7 +521,7 @@ public struct ${Self} : ${Traversal}Index {
|
||||
/// identical.
|
||||
@warn_unused_result
|
||||
public func == (lhs: ${Self}, rhs: ${Self}) -> Bool {
|
||||
require(lhs._typeID == rhs._typeID, "base index types differ.")
|
||||
precondition(lhs._typeID == rhs._typeID, "base index types differ.")
|
||||
return lhs._box.equals(rhs._box)
|
||||
}
|
||||
% end
|
||||
|
||||
Reference in New Issue
Block a user