Mutating Struct and State Observers: How the Latter Will Be Notified Even for 'No-Ops'
I may be 7 years late or so – but until last week, I didn’t realize that didSet
property observers would fire when the observed property hasn’t actually changed. All you need is a mutating func
that doesn’t even need to mutate. This can be illustrated with a simple piece of code: