Skip to content

Commit

Permalink
Conform Identifier to Sendable and Hashable
Browse files Browse the repository at this point in the history
This isn't explicitly needed for this problem but it seems as though
the default for all types that can conform to Sendable/Hashable should

This also sets up this new type for Swift 6.0 (and the current Swift 5.10)
to pass this type around safely when needed

As well as allows Identifier to be a key in a dictionary which could be
a common scenario
  • Loading branch information
adammcarter committed Mar 29, 2024
1 parent d5e150e commit 336b4b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SwiftSyntax/Identifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//===----------------------------------------------------------------------===//

/// An abstraction for sanitized values on a token.
public struct Identifier: Equatable {
public struct Identifier: Equatable, Hashable, Sendable {
/// The sanitized `text` of a token.
public let name: String

Expand Down

0 comments on commit 336b4b3

Please sign in to comment.