@@ -157,10 +157,6 @@ public struct BSONNull: BSONValue, Codable, Equatable {
157157 throw bsonTooLargeError ( value: self , forKey: key)
158158 }
159159 }
160-
161- public static func == ( lhs: BSONNull , rhs: BSONNull ) -> Bool {
162- return true
163- }
164160}
165161
166162/// A struct to represent the BSON Binary type.
@@ -285,10 +281,6 @@ public struct Binary: BSONValue, Equatable, Codable {
285281 let dataObj = Data ( bytes: data, count: Int ( length) )
286282 return try self . init ( data: dataObj, subtype: UInt8 ( subtype. rawValue) )
287283 }
288-
289- public static func == ( lhs: Binary , rhs: Binary ) -> Bool {
290- return lhs. data == rhs. data && lhs. subtype == rhs. subtype
291- }
292284}
293285
294286/// An extension of `Bool` to represent the BSON Boolean type.
@@ -391,10 +383,6 @@ public struct DBPointer: BSONValue, Codable, Equatable {
391383
392384 return DBPointer ( ref: String ( cString: collectionP) , id: ObjectId ( fromPointer: oidP) )
393385 }
394-
395- public static func == ( lhs: DBPointer , rhs: DBPointer ) -> Bool {
396- return lhs. ref == rhs. ref && lhs. id == rhs. id
397- }
398386}
399387
400388/// A struct to represent the BSON Decimal128 type.
@@ -620,10 +608,6 @@ public struct CodeWithScope: BSONValue, Equatable, Codable {
620608
621609 return self . init ( code: code, scope: scopeDoc)
622610 }
623-
624- public static func == ( lhs: CodeWithScope , rhs: CodeWithScope ) -> Bool {
625- return lhs. code == rhs. code && lhs. scope == rhs. scope
626- }
627611}
628612
629613/// A struct to represent the BSON MaxKey type.
@@ -655,8 +639,6 @@ public struct MaxKey: BSONValue, Equatable, Codable {
655639 }
656640 return MaxKey ( )
657641 }
658-
659- public static func == ( lhs: MaxKey , rhs: MaxKey ) -> Bool { return true }
660642}
661643
662644/// A struct to represent the BSON MinKey type.
@@ -688,8 +670,6 @@ public struct MinKey: BSONValue, Equatable, Codable {
688670 }
689671 return MinKey ( )
690672 }
691-
692- public static func == ( lhs: MinKey , rhs: MinKey ) -> Bool { return true }
693673}
694674
695675/// A struct to represent the BSON ObjectId type.
@@ -904,11 +884,6 @@ public struct RegularExpression: BSONValue, Equatable, Codable {
904884
905885 return self . init ( pattern: patternString, options: optionsString)
906886 }
907-
908- /// Returns `true` if the two `RegularExpression`s have matching patterns and options, and `false` otherwise.
909- public static func == ( lhs: RegularExpression , rhs: RegularExpression ) -> Bool {
910- return lhs. pattern == rhs. pattern && lhs. options == rhs. options
911- }
912887}
913888
914889/// An extension of String to represent the BSON string type.
@@ -991,10 +966,6 @@ public struct Symbol: BSONValue, CustomStringConvertible, Codable, Equatable {
991966
992967 return Symbol ( strValue)
993968 }
994-
995- public static func == ( lhs: Symbol , rhs: Symbol ) -> Bool {
996- return lhs. stringValue == rhs. stringValue
997- }
998969}
999970
1000971/// A struct to represent the BSON Timestamp type.
@@ -1044,10 +1015,6 @@ public struct Timestamp: BSONValue, Equatable, Codable {
10441015
10451016 return self . init ( timestamp: t, inc: i)
10461017 }
1047-
1048- public static func == ( lhs: Timestamp , rhs: Timestamp ) -> Bool {
1049- return lhs. timestamp == rhs. timestamp && lhs. increment == rhs. increment
1050- }
10511018}
10521019
10531020/// A struct to represent the deprecated Undefined type.
@@ -1077,10 +1044,6 @@ public struct BSONUndefined: BSONValue, Equatable, Codable {
10771044 }
10781045 return BSONUndefined ( )
10791046 }
1080-
1081- public static func == ( lhs: BSONUndefined , rhs: BSONUndefined ) -> Bool {
1082- return true
1083- }
10841047}
10851048
10861049// See https://github.com/realm/SwiftLint/issues/461
0 commit comments