Provide hash(into:) functions where the default implementation might be doing too much work.

This commit is contained in:
Brent Simmons
2024-05-26 11:53:36 -07:00
parent 401050465e
commit e275367664
11 changed files with 78 additions and 5 deletions

View File

@@ -25,16 +25,16 @@ public struct ParsedAuthor: Hashable, Codable, Sendable {
// MARK: - Hashable
public func hash(into hasher: inout Hasher) {
if let name = name {
if let name {
hasher.combine(name)
}
else if let url = url {
else if let url {
hasher.combine(url)
}
else if let emailAddress = emailAddress {
else if let emailAddress {
hasher.combine(emailAddress)
}
else if let avatarURL = avatarURL {
else if let avatarURL{
hasher.combine(avatarURL)
}
else {