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

Improper use of while loop #380

Closed
2 tasks done
flumaves opened this issue Nov 4, 2023 · 3 comments · Fixed by #395
Closed
2 tasks done

Improper use of while loop #380

flumaves opened this issue Nov 4, 2023 · 3 comments · Fixed by #395
Labels
good first issue Good for newcomers help wanted Extra attention is needed refactor Refactor code to improve quality

Comments

@flumaves
Copy link
Contributor

flumaves commented Nov 4, 2023

Terms

Issue

var i = 0
while i < 3 {
    // doing work here
    i += 1
}

The for loop is a better alternative here, like

for i in 0..<3 {
    // doing work here
}
@flumaves
Copy link
Contributor Author

flumaves commented Nov 4, 2023

Maybe this issue can be merged into the issue #379

@andrewtavis
Copy link
Member

Hey @flumaves 👋 Makes sense to me! Feel free to send along a stand alone PR for any changes that match this and we can close this up :)

@andrewtavis
Copy link
Member

Let me know if it's ok to assign you :)

@andrewtavis andrewtavis added good first issue Good for newcomers help wanted Extra attention is needed refactor Refactor code to improve quality labels Nov 4, 2023
andrewtavis added a commit that referenced this issue Jan 14, 2024
Fixes #380: Code quality improvement by replacing while with for loop
SaurabhJamadagni pushed a commit to marekviktor/Scribe-iOS that referenced this issue Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed refactor Refactor code to improve quality
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants