Semantically, the notifications for a formatter are a set: ordering doesn't matter and duplicates shouldn't be allowed.  This method may be called from somewhere else in the future and given the semantics of the data, it would be good to use a data structure that correctly represents those semantics.  Given that it's not any more code to use sets here and `|`, why not use sets?  Then the callers are relieved of the responsibility of turning it into a set.