我已为from ld in "lemming_data",
where: fragment("? = (SELECT max(weight) FROM lemming_data WHERE group = ?)", ld.weight, ld.group_name),
select: ld # or {ld.group_name, ld.id, ld.name, ld.weight}
类型声明了以下内容:
tuple
但现在当我尝试在断言中使用它时,如public typealias Http2HeaderTableEntry = (field: String, value: String?)
func ==(lhs: [Http2HeaderTableEntry], rhs: [Http2HeaderTableEntry]) -> Bool {
guard lhs.count == rhs.count else { return false }
for (idx, element) in lhs.enumerated() {
guard element.field == rhs[idx].field && element.value == rhs[idx].value else {
return false
}
}
return true
}
我收到编译错误:
无法调用' XCTAssertEqual'使用类型'([Http2HeaderTableEntry],[Http2HeaderTableEntry])'
的参数列表
为了能够在Swift 4中比较两个元组数组,我需要做些什么?