Skip to content
Snippets Groups Projects
Commit 0498cb31 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add remove function to PasswordStorage

parent dddbc9b2
Branches
Tags
2 merge requests!102Release 1.0.0,!59Update MessengerDestory
This commit is part of merge request !59. Comments created here will be created in the context of that merge request.
...@@ -8,19 +8,23 @@ public struct PasswordStorage { ...@@ -8,19 +8,23 @@ public struct PasswordStorage {
public init( public init(
save: @escaping (Data) throws -> Void, save: @escaping (Data) throws -> Void,
load: @escaping () throws -> Data load: @escaping () throws -> Data,
remove: @escaping () throws -> Void
) { ) {
self.save = save self.save = save
self.load = load self.load = load
self.remove = remove
} }
public var save: (Data) throws -> Void public var save: (Data) throws -> Void
public var load: () throws -> Data public var load: () throws -> Data
public var remove: () throws -> Void
} }
extension PasswordStorage { extension PasswordStorage {
public static let unimplemented = PasswordStorage( public static let unimplemented = PasswordStorage(
save: XCTUnimplemented("\(Self.self).save"), save: XCTUnimplemented("\(Self.self).save"),
load: XCTUnimplemented("\(Self.self).load") load: XCTUnimplemented("\(Self.self).load"),
remove: XCTUnimplemented("\(Self.self).remove")
) )
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment