Skip to content

Commit 6bd5a97

Browse files
committed
stdlib: ranges: remove requirements from RangeProtocol that only have one implementation
1 parent 26b24d0 commit 6bd5a97

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

stdlib/public/core/Range.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@ public protocol RangeProtocol : Equatable {
6363
/// upper bound.
6464
@warn_unused_result
6565
func contains(_ value: Bound) -> Bool
66-
67-
/// Returns `true` iff `self` and `other` contain a value in common.
68-
///
69-
/// Any type of range contains every value `x` where
70-
/// `lowerBound < x < upperBound`. `RangeProtocol` makes no requirement as
71-
/// to whether individual range types must contain either their lower or
72-
/// upper bound.
73-
func overlaps(_ other: Self) -> Bool
7466

7567
/// Returns `true` iff `self.contains(x)` is `false` for all values of `x`.
7668
var isEmpty: Bool { get }
@@ -90,12 +82,6 @@ public protocol RangeProtocol : Equatable {
9082
/// Depending on the concrete type of the range, `upperBound` may or may not
9183
/// be contained in the range.
9284
var upperBound: Bound { get }
93-
94-
/// Returns `self` clamped to `limits`.
95-
///
96-
/// The bounds of the result, even if it is empty, are always
97-
/// limited to the bounds of `limits`.
98-
func clamped(to limits: Self) -> Self
9985
}
10086

10187
extension RangeProtocol {

0 commit comments

Comments
 (0)