Skip to content

Commit

Permalink
Improve nullability
Browse files Browse the repository at this point in the history
Non-null Flows will be passed on as such, while nullable Flows will
correctly pass through null values.
  • Loading branch information
janseeger committed Oct 27, 2023
1 parent 6b531c7 commit f353ca5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.util.Log
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map

inline fun <T> Flow<T?>.printFlow(
inline fun <T> Flow<T>.printFlow(
tag: String = "from flow",
crossinline printFunc: (String) -> Unit = { content -> Log.d(tag, content) },
crossinline stringFunc: (T?) -> String? = { it.toString() }
Expand Down

0 comments on commit f353ca5

Please sign in to comment.