Files
Stephen Celis be44c34910 Support ordered dictionaries/sets (#80)
We currently auto-sort the children of any mirror with a display style
of dictionary or set alphabetically. This is important for consistent
dumps (good for snapshot tests, too), but affects types that don't need
the sorting, like ordered dictionaries and sets.

This PR introduces an `_UnorderedCollection` protocol to control this
behavior, and conforms `Dictionary`, `Set`, and their `NS`-
predecessors, but leaves other types open to dumping and diffing in an
ordered way by default.
2023-03-22 11:08:42 -07:00

8 lines
233 B
Swift

import Foundation
public protocol _UnorderedCollection {}
extension Dictionary: _UnorderedCollection {}
extension NSDictionary: _UnorderedCollection {}
extension NSSet: _UnorderedCollection {}
extension Set: _UnorderedCollection {}