Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code in Result example #269

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

mattmassicotte
Copy link
Contributor

I'm reading through the concurrency section, and I stumbled across a code snippet that does not compile. It has two errors:

  • It is missing a generic parameter
  • It relies on an async override for Result that may one day exist, but does not today

Further I think it is slightly confusing to mix the use of await and throws, when the section is fairly clear about making the distinction between the two.

My solution fixes the syntax, and slightly changes the method being used to remove even a suggestion of concurrency usage.

@amartini51 amartini51 changed the title Remove async usage Fix code in Result example Feb 22, 2024
@amartini51 amartini51 merged commit 72f6eb7 into apple:main Feb 22, 2024
@mattmassicotte mattmassicotte deleted the fix/concurrency-result-usage branch February 23, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants