File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public func run_Dictionary2(_ N: Int) {
37
37
CheckResults ( res == ref_result, " Incorrect results in Dictionary2: \( res) != \( ref_result) " )
38
38
}
39
39
40
- class Box < T : Hashable > : Hashable {
40
+ class Box < T : Hashable > : Hashable where T : Equatable {
41
41
var value : T
42
42
43
43
init ( _ v: T ) {
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ import TestsUtils
16
16
17
17
typealias rrggbb_t = UInt32
18
18
19
- func output_sorted_sparse_rgb_histogram< S: Sequence where S. Iterator. Element == rrggbb_t > ( _ samples: S , _ N: Int ) {
19
+ func output_sorted_sparse_rgb_histogram< S: Sequence > ( _ samples: S , _ N: Int )
20
+ where S. Iterator. Element == rrggbb_t {
20
21
var histogram = Dictionary < rrggbb_t , Int > ( )
21
22
for _ in 1 ... 50 * N {
22
23
for sample in samples { // This part is really awful, I agree
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ extension Array : MyArrayBufferProtocol {
35
35
}
36
36
}
37
37
38
- func myArrayReplace< B : MyArrayBufferProtocol , C : Collection
39
- where C . Iterator . Element == B . Element , B . Index == Int
40
- > (
41
- _ target: inout B , _ subRange: Range < Int > , _ newValues: C
42
- ) {
38
+ func myArrayReplace<
39
+ B : MyArrayBufferProtocol ,
40
+ C : Collection
41
+ > ( _ target: inout B , _ subRange: Range < Int > , _ newValues: C )
42
+ where C . Iterator . Element == B . Element , B . Index == Int {
43
43
target. myReplace ( subRange, with: newValues)
44
44
}
45
45
You can’t perform that action at this time.
0 commit comments