Skip to content

Commit

Permalink
Make JWTError.Backing a struct (vapor#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptoffy authored Mar 23, 2024
1 parent 295a5e5 commit 5879845
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/JWTKit/JWTError.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Foundation

/// JWT error type.
/// @unchecked Sendable is fine as we're using Copy on Write semantics.
public struct JWTError: Error, @unchecked Sendable {
public struct JWTError: Error {
public struct ErrorType: Sendable, Hashable, CustomStringConvertible {
enum Base: Sendable, Hashable {
case claimVerificationFailure
Expand Down Expand Up @@ -72,7 +71,7 @@ public struct JWTError: Error, @unchecked Sendable {
}
}

private final class Backing {
private struct Backing: Sendable {
fileprivate var errorType: ErrorType
fileprivate var name: String?
fileprivate var reason: String?
Expand Down

0 comments on commit 5879845

Please sign in to comment.