Skip to content

Comments

Fix error handling when no features are found and remove force casting#149

Merged
nathanfallet merged 1 commit intotwostraws:mainfrom
tataruRobert:my-feature-branch
Dec 1, 2024
Merged

Fix error handling when no features are found and remove force casting#149
nathanfallet merged 1 commit intotwostraws:mainfrom
tataruRobert:my-feature-branch

Conversation

@tataruRobert
Copy link
Contributor

  • Ensures that the application properly handles cases where no features are found, preventing silent failures.

  • Removes the use of force casting, improving code safety and reliability.

@AtrakhimovichDev
Copy link

Could this be merged?

@tataruRobert
Copy link
Contributor Author

Yes

if qrCodeLink.isEmpty {
didFail(reason: .badOutput)
} else {
if features.isEmpty {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have used a guard here too; but it's okay anyway

@nathanfallet nathanfallet merged commit 746c1c1 into twostraws:main Dec 1, 2024
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.

3 participants