Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Sources/SmartCodable/Core/PropertyWrapper/SmartIgnored.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ public struct SmartIgnored<T>: PropertyWrapperable {
}
}

extension SmartIgnored: Equatable where T: Equatable {
public static func == (lhs: Self, rhs: Self) -> Bool {
return lhs.wrappedValue == rhs.wrappedValue
}
}

extension SmartIgnored: Hashable where T: Hashable {
public func hash(into hasher: inout Hasher) {
wrappedValue.hash(into: &hasher)
}
}

extension SmartIgnored: Codable {
public init(from decoder: Decoder) throws {
Expand Down