Skip to content

Instantly share code, notes, and snippets.

@agiletalk
Created February 7, 2022 01:01
Show Gist options
  • Save agiletalk/55b51e056c5209d6cb4e0e282c7c1ea3 to your computer and use it in GitHub Desktop.
Save agiletalk/55b51e056c5209d6cb4e0e282c7c1ea3 to your computer and use it in GitHub Desktop.
correct await
func loadFeedEntries() async throws -> Feed.Entries {
async let feed = loadFeed()
async let banners = loadBanner()
async let articles = loadArticles()
async let status = loadRegularPayment()
async let watching = loadWantedPlusWatching()
return try await Feed.Entries(
...
banners: banners,
articles: articles,
status: status,
watching: watching,
...
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment