mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Fix warning about implicit type, introduced in Kotlin 1.5.20.
"Returning type parameter has been inferred to Nothing implicitly. Please specify type arguments explicitly to hide this warning. Nothing can produce an exception at runtime."
This commit is contained in:
parent
b1a1b4651e
commit
631e7881ef
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ internal object WorkerParamsFactory {
|
|||
|
||||
inline fun <reified T> fromData(data: Data) = fromData(T::class.java, data)
|
||||
|
||||
fun <T> fromData(clazz: Class<T>, data: Data): T? = tryOrNull("Unable to parse work parameters") {
|
||||
fun <T> fromData(clazz: Class<T>, data: Data): T? = tryOrNull<T?>("Unable to parse work parameters") {
|
||||
val json = data.getString(KEY)
|
||||
return if (json == null) {
|
||||
null
|
||||
|
|
Loading…
Reference in a new issue