diff --git a/Sources/Plugin/ImmutablePlugin.swift b/Sources/Plugin/ImmutablePlugin.swift index 9647e02..2999bf6 100644 --- a/Sources/Plugin/ImmutablePlugin.swift +++ b/Sources/Plugin/ImmutablePlugin.swift @@ -1,26 +1,25 @@ /// A protocol that defines a plugin that can be registered and handled by a `Pluginable` object. public protocol ImmutablePlugin: Plugin where Output == Void, Source == ImmutablePluginable { - /// The input value that the plugin will handle. - associatedtype Value + associatedtype Input = Input /// Handles the input value. /// /// - Parameters: /// - value: The input value that the plugin will handle. /// - Throws: Any errors that occur during handling of the input value. - func handle(value: Value) async throws + func handle(value: Input) async throws } // MARK: Public Implementation -extension ImmutablePlugin where Value == Input { +extension ImmutablePlugin { /// A keypath that provides access to the `immutable` property of the `Source`. public var keyPath: WritableKeyPath { get { \.immutable } set { } } - public func handle(value: Value, output: inout ()) async throws { + public func handle(value: Input, output: inout ()) async throws { try await handle(value: value) } }