Skip to content

Commit

Permalink
Improve compatibility with strict concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 20, 2024
1 parent 3167b29 commit 88dd4eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/DockProgress/DockProgress.swift
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ extension DockProgress {
- `.badge` ![](https://github.com/sindresorhus/DockProgress/blob/main/screenshot-badge.gif?raw=true)
- `.pie` ![](https://github.com/sindresorhus/DockProgress/blob/main/screenshot-pie.gif?raw=true)
*/
public enum Style {
public enum Style: Sendable {
/**
Progress bar style.
Expand Down Expand Up @@ -365,7 +365,7 @@ extension DockProgress {
![](https://github.com/sindresorhus/DockProgress/blob/main/screenshot-badge.gif?raw=true)
*/
case badge(color: NSColor = .controlAccentColor, badgeValue: () -> Int)
case badge(color: NSColor = .controlAccentColor, badgeValue: @MainActor @Sendable () -> Int)

/**
Pie style.
Expand All @@ -384,6 +384,6 @@ extension DockProgress {
- Parameters:
- drawHandler: A closure that is responsible for drawing the custom progress.
*/
case custom(drawHandler: (_ rect: CGRect) -> Void)
case custom(drawHandler: @MainActor @Sendable (_ rect: CGRect) -> Void)
}
}

0 comments on commit 88dd4eb

Please sign in to comment.