Skip to content

Commit 00fe5ad

Browse files
simplify and clarify async requirement usage #36 (#47)
1 parent 27bb36f commit 00fe5ad

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Guide.docc/CommonProblems.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,8 @@ protocol requirement with an isolated method:
278278
```swift
279279
@MainActor
280280
class WindowStyler: Styler {
281-
var showShadows: Bool = true
281+
// matches, even though it is synchronous and actor-isolated
282282
func applyStyle() {
283-
// implicit switch to the @MainActor before accessing main actor state
284-
285-
showShadows.toggle()
286283
}
287284
}
288285
```

0 commit comments

Comments
 (0)