mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Update partition tests with feedback
This commit is contained in:
@@ -76,10 +76,8 @@ extension MutableCollection
|
||||
where Self: RandomAccessCollection, Self.Iterator.Element : Comparable {
|
||||
|
||||
public final mutating func myPartition() -> Index {
|
||||
if let first = self.first {
|
||||
return self.partition(by: { $0 >= first})
|
||||
}
|
||||
return self.startIndex
|
||||
let first = self.first
|
||||
return self.partition(by: { $0 >= first! })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user