Skip to content

Commit 06d6447

Browse files
committed
Upgrade to Swift 4.
1 parent 8c9853c commit 06d6447

12 files changed

+72
-22
lines changed

BTree.xcodeproj/project.pbxproj

+39-6
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@
573573
isa = PBXProject;
574574
attributes = {
575575
LastSwiftUpdateCheck = 0820;
576-
LastUpgradeCheck = 0820;
576+
LastUpgradeCheck = 0900;
577577
ORGANIZATIONNAME = "Károly Lőrentey";
578578
TargetAttributes = {
579579
BB338C841DD27D2F00BB401D = {
@@ -582,10 +582,11 @@
582582
};
583583
BB54D0AE1C1F0357008A462B = {
584584
CreatedOnToolsVersion = 7.2;
585-
LastSwiftMigration = 0800;
585+
LastSwiftMigration = 0900;
586586
};
587587
BB54D0B81C1F0357008A462B = {
588588
CreatedOnToolsVersion = 7.2;
589+
LastSwiftMigration = 0900;
589590
};
590591
BB8FE9981C7C8CDC0051268F = {
591592
CreatedOnToolsVersion = 7.2.1;
@@ -967,14 +968,20 @@
967968
CLANG_CXX_LIBRARY = "libc++";
968969
CLANG_ENABLE_MODULES = YES;
969970
CLANG_ENABLE_OBJC_ARC = YES;
971+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
970972
CLANG_WARN_BOOL_CONVERSION = YES;
973+
CLANG_WARN_COMMA = YES;
971974
CLANG_WARN_CONSTANT_CONVERSION = YES;
972975
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
973976
CLANG_WARN_EMPTY_BODY = YES;
974977
CLANG_WARN_ENUM_CONVERSION = YES;
975978
CLANG_WARN_INFINITE_RECURSION = YES;
976979
CLANG_WARN_INT_CONVERSION = YES;
980+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
981+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
977982
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
983+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
984+
CLANG_WARN_STRICT_PROTOTYPES = YES;
978985
CLANG_WARN_SUSPICIOUS_MOVE = YES;
979986
CLANG_WARN_UNREACHABLE_CODE = YES;
980987
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -999,7 +1006,7 @@
9991006
MTL_ENABLE_DEBUG_INFO = NO;
10001007
SWIFT_DISABLE_SAFETY_CHECKS = YES;
10011008
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1002-
SWIFT_VERSION = 3.0;
1009+
SWIFT_VERSION = 4.0;
10031010
TARGETED_DEVICE_FAMILY = "1,2";
10041011
TVOS_DEPLOYMENT_TARGET = 9.0;
10051012
VALIDATE_PRODUCT = YES;
@@ -1053,6 +1060,8 @@
10531060
PRODUCT_BUNDLE_IDENTIFIER = com.github.lorentey.BTree.Tests.iOS;
10541061
PRODUCT_NAME = BTreeTests;
10551062
SDKROOT = iphoneos;
1063+
SWIFT_SWIFT3_OBJC_INFERENCE = On;
1064+
SWIFT_VERSION = 4.0;
10561065
};
10571066
name = Unchecked;
10581067
};
@@ -1079,14 +1088,20 @@
10791088
CLANG_CXX_LIBRARY = "libc++";
10801089
CLANG_ENABLE_MODULES = YES;
10811090
CLANG_ENABLE_OBJC_ARC = YES;
1091+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
10821092
CLANG_WARN_BOOL_CONVERSION = YES;
1093+
CLANG_WARN_COMMA = YES;
10831094
CLANG_WARN_CONSTANT_CONVERSION = YES;
10841095
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
10851096
CLANG_WARN_EMPTY_BODY = YES;
10861097
CLANG_WARN_ENUM_CONVERSION = YES;
10871098
CLANG_WARN_INFINITE_RECURSION = YES;
10881099
CLANG_WARN_INT_CONVERSION = YES;
1100+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1101+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
10891102
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1103+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1104+
CLANG_WARN_STRICT_PROTOTYPES = YES;
10901105
CLANG_WARN_SUSPICIOUS_MOVE = YES;
10911106
CLANG_WARN_UNREACHABLE_CODE = YES;
10921107
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -1117,7 +1132,7 @@
11171132
ONLY_ACTIVE_ARCH = YES;
11181133
OTHER_SWIFT_FLAGS = "-DDebug $(inherited)";
11191134
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1120-
SWIFT_VERSION = 3.0;
1135+
SWIFT_VERSION = 4.0;
11211136
TARGETED_DEVICE_FAMILY = "1,2";
11221137
TVOS_DEPLOYMENT_TARGET = 9.0;
11231138
VERSIONING_SYSTEM = "";
@@ -1135,14 +1150,20 @@
11351150
CLANG_CXX_LIBRARY = "libc++";
11361151
CLANG_ENABLE_MODULES = YES;
11371152
CLANG_ENABLE_OBJC_ARC = YES;
1153+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
11381154
CLANG_WARN_BOOL_CONVERSION = YES;
1155+
CLANG_WARN_COMMA = YES;
11391156
CLANG_WARN_CONSTANT_CONVERSION = YES;
11401157
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
11411158
CLANG_WARN_EMPTY_BODY = YES;
11421159
CLANG_WARN_ENUM_CONVERSION = YES;
11431160
CLANG_WARN_INFINITE_RECURSION = YES;
11441161
CLANG_WARN_INT_CONVERSION = YES;
1162+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1163+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
11451164
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1165+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1166+
CLANG_WARN_STRICT_PROTOTYPES = YES;
11461167
CLANG_WARN_SUSPICIOUS_MOVE = YES;
11471168
CLANG_WARN_UNREACHABLE_CODE = YES;
11481169
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -1166,7 +1187,7 @@
11661187
MTL_ENABLE_DEBUG_INFO = NO;
11671188
OTHER_SWIFT_FLAGS = "-DENABLE_BENCHMARK_TESTS $(inherited)";
11681189
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1169-
SWIFT_VERSION = 3.0;
1190+
SWIFT_VERSION = 4.0;
11701191
TARGETED_DEVICE_FAMILY = "1,2";
11711192
TVOS_DEPLOYMENT_TARGET = 9.0;
11721193
VALIDATE_PRODUCT = YES;
@@ -1218,6 +1239,8 @@
12181239
PRODUCT_BUNDLE_IDENTIFIER = com.github.lorentey.BTree.Tests.iOS;
12191240
PRODUCT_NAME = BTreeTests;
12201241
SDKROOT = iphoneos;
1242+
SWIFT_SWIFT3_OBJC_INFERENCE = On;
1243+
SWIFT_VERSION = 4.0;
12211244
};
12221245
name = Debug;
12231246
};
@@ -1229,6 +1252,8 @@
12291252
PRODUCT_BUNDLE_IDENTIFIER = com.github.lorentey.BTree.Tests.iOS;
12301253
PRODUCT_NAME = BTreeTests;
12311254
SDKROOT = iphoneos;
1255+
SWIFT_SWIFT3_OBJC_INFERENCE = On;
1256+
SWIFT_VERSION = 4.0;
12321257
};
12331258
name = Release;
12341259
};
@@ -1499,14 +1524,20 @@
14991524
CLANG_CXX_LIBRARY = "libc++";
15001525
CLANG_ENABLE_MODULES = YES;
15011526
CLANG_ENABLE_OBJC_ARC = YES;
1527+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
15021528
CLANG_WARN_BOOL_CONVERSION = YES;
1529+
CLANG_WARN_COMMA = YES;
15031530
CLANG_WARN_CONSTANT_CONVERSION = YES;
15041531
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
15051532
CLANG_WARN_EMPTY_BODY = YES;
15061533
CLANG_WARN_ENUM_CONVERSION = YES;
15071534
CLANG_WARN_INFINITE_RECURSION = YES;
15081535
CLANG_WARN_INT_CONVERSION = YES;
1536+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1537+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
15091538
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1539+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1540+
CLANG_WARN_STRICT_PROTOTYPES = YES;
15101541
CLANG_WARN_SUSPICIOUS_MOVE = YES;
15111542
CLANG_WARN_UNREACHABLE_CODE = YES;
15121543
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -1530,7 +1561,7 @@
15301561
MACOSX_DEPLOYMENT_TARGET = 10.9;
15311562
MTL_ENABLE_DEBUG_INFO = NO;
15321563
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1533-
SWIFT_VERSION = 3.0;
1564+
SWIFT_VERSION = 4.0;
15341565
TARGETED_DEVICE_FAMILY = "1,2";
15351566
TVOS_DEPLOYMENT_TARGET = 9.0;
15361567
VALIDATE_PRODUCT = YES;
@@ -1584,6 +1615,8 @@
15841615
PRODUCT_BUNDLE_IDENTIFIER = com.github.lorentey.BTree.Tests.iOS;
15851616
PRODUCT_NAME = BTreeTests;
15861617
SDKROOT = iphoneos;
1618+
SWIFT_SWIFT3_OBJC_INFERENCE = On;
1619+
SWIFT_VERSION = 4.0;
15871620
};
15881621
name = Profile;
15891622
};

BTree.xcodeproj/xcshareddata/xcschemes/BTree-PerformanceTests.xcscheme

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Release"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
<TestableReference
@@ -55,6 +56,7 @@
5556
buildConfiguration = "Debug"
5657
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5758
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59+
language = ""
5860
launchStyle = "0"
5961
useCustomWorkingDirectory = "NO"
6062
ignoresPersistentStateOnLaunch = "NO"

BTree.xcodeproj/xcshareddata/xcschemes/BTree-iOS.xcscheme

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
<TestableReference
@@ -55,6 +56,7 @@
5556
buildConfiguration = "Debug"
5657
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5758
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59+
language = ""
5860
launchStyle = "0"
5961
useCustomWorkingDirectory = "NO"
6062
ignoresPersistentStateOnLaunch = "NO"

BTree.xcodeproj/xcshareddata/xcschemes/BTree-macOS.xcscheme

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES"
3031
codeCoverageEnabled = "YES">
3132
<Testables>
@@ -56,6 +57,7 @@
5657
buildConfiguration = "Debug"
5758
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5859
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
60+
language = ""
5961
launchStyle = "0"
6062
useCustomWorkingDirectory = "NO"
6163
ignoresPersistentStateOnLaunch = "NO"

BTree.xcodeproj/xcshareddata/xcschemes/BTree-tvOS.xcscheme

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
<TestableReference
@@ -55,6 +56,7 @@
5556
buildConfiguration = "Debug"
5657
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5758
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59+
language = ""
5860
launchStyle = "0"
5961
useCustomWorkingDirectory = "NO"
6062
ignoresPersistentStateOnLaunch = "NO"

BTree.xcodeproj/xcshareddata/xcschemes/BTree-watchOS.xcscheme

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
</Testables>
@@ -36,6 +37,7 @@
3637
buildConfiguration = "Debug"
3738
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3839
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40+
language = ""
3941
launchStyle = "0"
4042
useCustomWorkingDirectory = "NO"
4143
ignoresPersistentStateOnLaunch = "NO"

Sources/BTree.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ public struct BTree<Key: Comparable, Value> {
2020
self.root = root
2121
}
2222

23+
/// Initialize a new B-tree with no elements.
24+
/// The order of the tree is set automatically based on the size of `Element` type.
25+
public init() {
26+
self.init(order: Node.defaultOrder)
27+
}
28+
2329
/// Initialize a new B-tree with no elements.
2430
///
2531
/// - Parameter order: The maximum number of children for tree nodes.
26-
public init(order: Int = Node.defaultOrder) {
32+
public init(order: Int) {
2733
self.root = Node(order: order)
2834
}
2935

Sources/BTreeBuilder.swift

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ extension BTree {
1616
/// - Parameter order: The desired B-tree order. If not specified (recommended), the default order is used.
1717
/// - Complexity: O(count * log(`count`))
1818
/// - SeeAlso: `init(sortedElements:order:fillFactor:)` for a (faster) variant that can be used if the sequence is already sorted.
19-
public init<S: Sequence>(_ elements: S, dropDuplicates: Bool = false, order: Int = Node.defaultOrder)
19+
public init<S: Sequence>(_ elements: S, dropDuplicates: Bool = false, order: Int? = nil)
2020
where S.Iterator.Element == Element {
21+
let order = order ?? Node.defaultOrder
2122
self.init(Node(order: order))
2223
withCursorAtEnd { cursor in
2324
for element in elements {
@@ -46,12 +47,12 @@ extension BTree {
4647
/// If not specified, a value of 1.0 is used, i.e., nodes will be loaded with as many elements as possible.
4748
/// - Complexity: O(count)
4849
/// - SeeAlso: `init(elements:order:fillFactor:)` for a (slower) unsorted variant.
49-
public init<S: Sequence>(sortedElements elements: S, dropDuplicates: Bool = false, order: Int = Node.defaultOrder, fillFactor: Double = 1) where S.Iterator.Element == Element {
50+
public init<S: Sequence>(sortedElements elements: S, dropDuplicates: Bool = false, order: Int? = nil, fillFactor: Double = 1) where S.Iterator.Element == Element {
5051
var iterator = elements.makeIterator()
51-
self.init(order: order, fillFactor: fillFactor, dropDuplicates: dropDuplicates, next: { iterator.next() })
52+
self.init(order: order ?? Node.defaultOrder, fillFactor: fillFactor, dropDuplicates: dropDuplicates, next: { iterator.next() })
5253
}
5354

54-
internal init(order: Int = Node.defaultOrder, fillFactor: Double = 1, dropDuplicates: Bool = false, next: () -> Element?) {
55+
internal init(order: Int, fillFactor: Double = 1, dropDuplicates: Bool = false, next: () -> Element?) {
5556
precondition(order > 1)
5657
precondition(fillFactor >= 0.5 && fillFactor <= 1)
5758
let keysPerNode = Int(fillFactor * Double(order - 1) + 0.5)

Sources/BTreeNode.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ internal final class BTreeNode<Key: Comparable, Value> {
5555
self.children = children
5656
self.count = count
5757
self._depth = (children.count == 0 ? 0 : children[0]._depth + 1)
58-
assert(children.index { $0._depth + 1 != self._depth } == nil)
58+
assert(children.index { $0._depth + (1 as Int32) != self._depth } == nil)
5959
}
6060
}
6161

Sources/BridgedList.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ internal class BridgedList<Value>: NSArray {
5454
return BridgedListEnumerator(iterator: tree.makeIterator())
5555
}
5656

57-
public override func countByEnumerating(with state: UnsafeMutablePointer<NSFastEnumerationState>, objects buffer: AutoreleasingUnsafeMutablePointer<AnyObject?>!, count len: Int) -> Int {
57+
public override func countByEnumerating(with state: UnsafeMutablePointer<NSFastEnumerationState>, objects buffer: AutoreleasingUnsafeMutablePointer<AnyObject?>, count len: Int) -> Int {
5858
precondition(MemoryLayout<(EmptyKey, Value)>.size == MemoryLayout<Value>.size)
5959
precondition(MemoryLayout<(EmptyKey, Value)>.stride == MemoryLayout<Value>.stride)
6060
precondition(MemoryLayout<(EmptyKey, Value)>.alignment == MemoryLayout<Value>.alignment)
@@ -77,7 +77,7 @@ internal class BridgedList<Value>: NSArray {
7777
return c
7878
}
7979

80-
buffer!.pointee = node.elements[slot].1 as AnyObject
80+
buffer.pointee = node.elements[slot].1 as AnyObject
8181
s.itemsPtr = buffer
8282
s.state += 1
8383
state.pointee = s

Tests/BTreeTests/BTreePathTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ class PathTests<Path: BTreePath> where Path.Key == Int, Path.Value == String {
436436
XCTAssertTrue(n.children[s] === node)
437437
}
438438
XCTAssertEqual(slot, 0)
439-
p.append(node, slot)
439+
p.append((node, slot))
440440
}
441441
XCTAssertTrue(p.last!.0.isLeaf)
442442

@@ -497,7 +497,7 @@ class PathTests<Path: BTreePath> where Path.Key == Int, Path.Value == String {
497497

498498
class BTreePathTests: XCTestCase {
499499
/// Poor man's generic test runner
500-
func runTests<Path: BTreePath>(_ tests: PathTests<Path>) where Path.Key == Int, Path.Value == String {
500+
func runTests<Path: BTreePath>(_ tests: PathTests<Path>) {
501501
for (name, testCase) in tests.testCases {
502502
print(" \(name)")
503503
testCase()

Tests/BTreeTests/XCTest extensions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func assertEqualElements<T1: Equatable, T2: Equatable, S1: Sequence, S2: Sequenc
2727
}
2828
}
2929

30-
func assertEqualElements<Element: Equatable, S1: Sequence, S2: Sequence, S1W: Sequence, S2W: Sequence>(_ a: S1, _ b: S2, file: StaticString = #file, line: UInt = #line) where S1.Iterator.Element == S1W, S2.Iterator.Element == S2W, S1W.Iterator.Element == Element, S2W.Iterator.Element == Element {
30+
func assertEqualElements<Element: Equatable, S1: Sequence, S2: Sequence, S1W: Sequence, S2W: Sequence>(_ a: S1, _ b: S2, element: Element.Type = Element.self, file: StaticString = #file, line: UInt = #line) where S1.Iterator.Element == S1W, S2.Iterator.Element == S2W, S1W.Iterator.Element == Element, S2W.Iterator.Element == Element {
3131
let aa = a.map { Array($0) }
3232
let ba = b.map { Array($0) }
3333
if !aa.elementsEqual(ba, by: { $0.elementsEqual($1) }) {

0 commit comments

Comments
 (0)