Fix eraser. (#640)

This commit is contained in:
Max Goedjen 2025-08-26 23:14:07 -07:00 提交者 GitHub
父節點 c52728a050
當前提交 6ce0510f21
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: B5690EEEBB952194
共有 2 個檔案被更改,包括 4 行新增3 行删除

查看文件

@ -61,13 +61,13 @@ open class AnySecretStore: SecretStore, @unchecked Sendable {
public final class AnySecretStoreModifiable: AnySecretStore, SecretStoreModifiable, @unchecked Sendable {
private let _create: @Sendable (String, Attributes) async throws -> SecretType
private let _create: @Sendable (String, Attributes) async throws -> AnySecret
private let _delete: @Sendable (AnySecret) async throws -> Void
private let _update: @Sendable (AnySecret, String, Attributes) async throws -> Void
private let _supportedKeyTypes: @Sendable () -> [KeyType]
public init<SecretStoreType>(_ secretStore: SecretStoreType) where SecretStoreType: SecretStoreModifiable {
_create = { try await secretStore.create(name: $0, attributes: $1) as! SecretType }
_create = { AnySecret(try await secretStore.create(name: $0, attributes: $1)) }
_delete = { try await secretStore.delete(secret: $0.base as! SecretStoreType.SecretType) }
_update = { try await secretStore.update(secret: $0.base as! SecretStoreType.SecretType, name: $1, attributes: $2) }
_supportedKeyTypes = { secretStore.supportedKeyTypes }

查看文件

@ -96,7 +96,8 @@ extension Preview {
}
func create(name: String, attributes: Attributes) throws {
func create(name: String, attributes: Attributes) throws -> Secret {
fatalError()
}
func delete(secret: Preview.Secret) throws {