Add swiftlint & Minor fixes

This commit is contained in:
世界
2025-11-27 16:10:55 +08:00
parent 8855e0eef9
commit 0bfb6d2516
29 changed files with 382 additions and 196 deletions
@@ -24,13 +24,12 @@ public struct Connection: Codable {
public let outboundType: String
public let chain: [String]
var hashValue: Int {
var value = id.hashValue
(value, _) = value.addingReportingOverflow(upload.hashValue)
(value, _) = value.addingReportingOverflow(download.hashValue)
(value, _) = value.addingReportingOverflow(uploadTotal.hashValue)
(value, _) = value.addingReportingOverflow(downloadTotal.hashValue)
return value
func hash(into hasher: inout Hasher) {
hasher.combine(id)
hasher.combine(upload)
hasher.combine(download)
hasher.combine(uploadTotal)
hasher.combine(downloadTotal)
}
func performSearch(_ content: String) -> Bool {