Skip to content

Commit

Permalink
docs: Use await for Swift Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jan 13, 2025
1 parent fe025d1 commit 0553937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/types/promises.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func saveToFile(image: HybridImage) -> Promise<Void> {
// code-error
^ // Error: Cannot return void!
return Promise.async {
data.writeToFile("file://tmp/img.png")
try await data.writeToFile("file://tmp/img.png")
}
}
```

0 comments on commit 0553937

Please sign in to comment.