Skip to content

Commit e96fa7a

Browse files
committed
Add missing fields in Equatable implementation
The `Equatable` implementation of `LinkDestinationSummary` was missing some of the new fields which were added recently. This commit adds them.
1 parent cfcd96f commit e96fa7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ public struct LinkDestinationSummary: Codable, Equatable {
112112
// so that external documentation sources don't need to provide that data.
113113
// Adding new required properties is considered breaking change since existing external documentation sources
114114
// wouldn't necessarily meet these new requirements.
115-
115+
// Make sure to update the encoding, decoding and Equatable implementations when adding new properties.
116+
116117
/// A collection of identifiers that all relate to some common task, as described by the title.
117118
public struct TaskGroup: Codable, Equatable {
118119
/// The title of this task group
@@ -935,12 +936,15 @@ extension LinkDestinationSummary {
935936
guard lhs.kind == rhs.kind else { return false }
936937
guard lhs.language == rhs.language else { return false }
937938
guard lhs.relativePresentationURL == rhs.relativePresentationURL else { return false }
939+
guard lhs.absolutePresentationURL == rhs.absolutePresentationURL else { return false }
938940
guard lhs.title == rhs.title else { return false }
939941
guard lhs.abstract == rhs.abstract else { return false }
940942
guard lhs.availableLanguages == rhs.availableLanguages else { return false }
941943
guard lhs.platforms == rhs.platforms else { return false }
942944
guard lhs.taskGroups == rhs.taskGroups else { return false }
945+
guard lhs.plainTextDeclaration == rhs.plainTextDeclaration else { return false }
943946
guard lhs.subheadingDeclarationFragments == rhs.subheadingDeclarationFragments else { return false }
947+
guard lhs.navigatorDeclarationFragments == rhs.navigatorDeclarationFragments else { return false }
944948
guard lhs.redirects == rhs.redirects else { return false }
945949
guard lhs.topicImages == rhs.topicImages else { return false }
946950
guard lhs.variants == rhs.variants else { return false }

0 commit comments

Comments
 (0)