touchlab / KaMPKit

KaMP Kit by Touchlab. A collection of code & tools designed to get your mobile team started quickly w/Kotlin Multiplatform
https://touchlab.co/
Apache License 2.0
2.2k stars 199 forks source link

Remove unnecessary suspend keyword from function returning a Flow #232

Closed StylianosGakis closed 2 years ago

StylianosGakis commented 2 years ago

Suspend functions should return when all of their work is done, returning a Flow shouldn't require the function to be suspending. More context here: https://rules.sonarsource.com/kotlin/RSPEC-6309

Seen here: https://github.com/touchlab/KaMPKit/blob/18d1c0032956ff9f64983927bf2e0135e923dea0/shared/src/commonMain/kotlin/co/touchlab/kampkit/DatabaseHelper.kt#L37-L42 Is there some other reason in particular why this was marked as suspend? I've built the project fine locally with this change.