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

EN | 7-5.md: Probably confusing code? #135

Open
psalzAppDev opened this issue Nov 3, 2018 · 0 comments
Open

EN | 7-5.md: Probably confusing code? #135

psalzAppDev opened this issue Nov 3, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@psalzAppDev
Copy link
Collaborator

Hi @twostraws, I noticed that at the end of chapter 7-5, there is the following code:

    if let url = URL(string: urlString) {
        if let data = try? Data(contentsOf: url) {
            parse(json: data)
            return
        } else {
            showError()
        }
    } else {
        showError()
    }

In the next paragraph, you suggest to add a return statement after parse() to clean up the code by removing the else-statements. But the return statement is already in the code above. So it seems that the return should not be in the code above, but only in the cleaned-up code given after this paragraph. I will submit the German translation as is, but if you agree that this should be changed, let me know and I will modify the translation.

Cheers,
Peter

@psalzAppDev psalzAppDev added the bug Something isn't working label Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants