Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Sort language menus alphabetically #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Sort language menus alphabetically #3

wants to merge 2 commits into from

Conversation

ErikMinekus
Copy link

I couldn't figure out how to put the sorted() call inside the guard, so I rewrote it so it's similar to the loadLanguage function below it. I believe the logic is the same.

@saagarjha
Copy link
Member

Put the closures in parentheses

@ErikMinekus
Copy link
Author

Thanks, it works with parentheses inside the guard. Can you explain why parentheses are needed in this case? The only differences I see with the code in loadLanguage are the guard and try?. And all I can find online is that you can use a trailing closure if it's the last or only argument.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants