Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions Sources/TestsCommon/CommonTestUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,7 @@ public protocol SortedEquatable {

extension BSONDocument: SortedEquatable {
public func sortedEquals(_ other: BSONDocument) -> Bool {
guard self.buffer.readableBytes == other.buffer.readableBytes else {
return false
}
for (k, v) in self {
guard let otherValue = other[k], v.sortedEquals(otherValue) else {
return false
}
}
return true
self.equalsIgnoreKeyOrder(other)
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the BSON portion (just below this line) still needs to be duplicated since we don't export that from the BSON library. I think that's fine since it's simple enough, and I don't think the method makes all that much sense on BSON outside of the contexts we use it in to include in the public API.

Expand Down