diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4bd22f..dfb6c26 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Swift uses: swift-actions/setup-swift@3aed395c5397f62deb91d8fe7af1418a9ae4d16f # v2.1.0 with: - swift-version: "5.10.0" + swift-version: "6.0.2" - name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/.swift-version b/.swift-version index 509b0b6..9b9a244 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -5.10.0 +6.0.2 diff --git a/Package.swift b/Package.swift index 7b9e4b3..824cef9 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.10 +// swift-tools-version: 6.0 import PackageDescription diff --git a/Sources/ComicSans/ComicSans.swift b/Sources/ComicSans/ComicSans.swift index 3fa022c..3531b5d 100644 --- a/Sources/ComicSans/ComicSans.swift +++ b/Sources/ComicSans/ComicSans.swift @@ -69,7 +69,7 @@ public struct ComicSans { return result.isEmpty ? nil : result } - @MainActor public func pngRepresentation(scale: Int = 2) -> Data? { + @MainActor public func pngRepresentation(scale: Int = 2) async -> Data? { let renderer = ImageRenderer(content: view) renderer.scale = CGFloat(scale) diff --git a/Sources/CommandLineTool/cs.swift b/Sources/CommandLineTool/cs.swift index aa76e3a..a7916a5 100644 --- a/Sources/CommandLineTool/cs.swift +++ b/Sources/CommandLineTool/cs.swift @@ -57,7 +57,7 @@ struct CommandLineTool: ParsableCommand { } } - @MainActor mutating func run() throws { + @MainActor mutating func run() async throws { let text = try isExpectingPipe ? parsePipeInput() : text let result = ComicSans( @@ -72,7 +72,7 @@ struct CommandLineTool: ParsableCommand { fileExtension: "png" ) - guard let pngData = result.pngRepresentation() else { + guard let pngData = await result.pngRepresentation() else { throw ExitCode.failure }