Post marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliessolved.tooltip
Replied In
guarding on enum value
Instead of extending Equatable, you can just have RawValue and compare it.
For example:
enum E: String {
case A, B, C(Int)
var rawValue: String {
if case .C(let something) = self { return "c_\(something)" }
return String(describing: self)
}
}
And than you can compare:
if A.rawValue != B.rawValue { ... }