Skip to content

Equality not taking into account order #11

@Aquilosion

Description

@Aquilosion

I notice the equality operator is not taking into account the order of the members:

public func ==<T>(lhs: OrderedSet<T>, rhs: OrderedSet<T>) -> Bool {
    return lhs.set == rhs.set
}

Is this intentional? I notice that NSOrderedSet does take their order into account:

Two ordered sets have equal contents if they each have the same number of members, if each member of one ordered set is present in the other, and the members are in the same order.

Should the equality operator not compare their internal arrays, instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions