diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/ActionExtensions/Action+performAndHandleResult.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/ActionExtensions/Action+performAndHandleResult.swift index 4edf038f8b..64f391e035 100644 --- a/Sources/SwiftDocCUtilities/ArgumentParsing/ActionExtensions/Action+performAndHandleResult.swift +++ b/Sources/SwiftDocCUtilities/ArgumentParsing/ActionExtensions/Action+performAndHandleResult.swift @@ -17,7 +17,7 @@ extension AsyncAction { /// - Parameter logHandle: The log handle to write encountered warnings and errors to. /// /// - Throws: `ErrorsEncountered` if any errors are produced while performing the action. - public mutating func performAndHandleResult(logHandle: LogHandle = .standardOutput) async throws { + public func performAndHandleResult(logHandle: LogHandle = .standardOutput) async throws { var logHandle = logHandle // Perform the Action and collect the result let result = try await perform(logHandle: &logHandle) diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Convert.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Convert.swift index ab98c07118..fd2cfe99f4 100644 --- a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Convert.swift +++ b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Convert.swift @@ -674,7 +674,7 @@ extension Docc { } public func run() async throws { - var convertAction = try ConvertAction(fromConvertCommand: self) + let convertAction = try ConvertAction(fromConvertCommand: self) try await convertAction.performAndHandleResult() } diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/EmitGeneratedCuration.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/EmitGeneratedCuration.swift index c0d953efbb..0722f04279 100644 --- a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/EmitGeneratedCuration.swift +++ b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/EmitGeneratedCuration.swift @@ -157,7 +157,7 @@ extension Docc.ProcessCatalog { } func run() async throws { - var action = try EmitGeneratedCurationAction(fromCommand: self) + let action = try EmitGeneratedCurationAction(fromCommand: self) try await action.performAndHandleResult() } } diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Index.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Index.swift index 224c9b267c..273486325d 100644 --- a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Index.swift +++ b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Index.swift @@ -37,7 +37,7 @@ extension Docc { } public func run() async throws { - var indexAction = try IndexAction(fromIndexCommand: self) + let indexAction = try IndexAction(fromIndexCommand: self) try await indexAction.performAndHandleResult() } } diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Init.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Init.swift index 51d6ba34d1..2810a8d2e1 100644 --- a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Init.swift +++ b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Init.swift @@ -25,7 +25,7 @@ extension Docc { public var initOptions: InitOptions public func run() async throws { - var initAction = try InitAction(fromInitOptions: initOptions) + let initAction = try InitAction(fromInitOptions: initOptions) try await initAction.performAndHandleResult() } } diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Merge.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Merge.swift index cde3cae489..d4c4179c9e 100644 --- a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Merge.swift +++ b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Merge.swift @@ -169,7 +169,7 @@ extension Docc { public func run() async throws { // Initialize a `ConvertAction` from the current options in the `Convert` command. - var convertAction = MergeAction( + let convertAction = MergeAction( archives: archives, landingPageInfo: .synthesize(.init(name: synthesizedLandingPageName, kind: synthesizedLandingPageKind, style: synthesizedLandingPageTopicsStyle)), outputURL: outputURL, diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Preview.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Preview.swift index b7898f87cd..467799e8f0 100644 --- a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Preview.swift +++ b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/Preview.swift @@ -44,7 +44,7 @@ extension Docc { } public func run() async throws { - var previewAction = try PreviewAction(fromPreviewOptions: previewOptions) + let previewAction = try PreviewAction(fromPreviewOptions: previewOptions) try await previewAction.performAndHandleResult() } } diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/TransformForStaticHosting.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/TransformForStaticHosting.swift index 96d3d9d894..d7af3cd6a3 100644 --- a/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/TransformForStaticHosting.swift +++ b/Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands/TransformForStaticHosting.swift @@ -63,7 +63,7 @@ extension Docc.ProcessArchive { } func run() async throws { - var action = try TransformForStaticHostingAction(fromCommand: self) + let action = try TransformForStaticHostingAction(fromCommand: self) try await action.performAndHandleResult() } }