Remove redundant crossinline (#4348)

Seems we don't need them in newer Kotlin.
This commit is contained in:
Zongle Wang 2024-03-30 04:12:49 +08:00 committed by GitHub
parent af016c1766
commit ba495f41a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ sealed interface Either<out L, out R> {
fun asRight(): R = (this as Right<L, R>).value
companion object {
inline fun <L, R, N> Either<L, R>.map(crossinline mapper: (R) -> N): Either<L, N> {
inline fun <L, R, N> Either<L, R>.map(mapper: (R) -> N): Either<L, N> {
return if (this.isLeft()) {
Left(this.asLeft())
} else {

View File

@ -118,7 +118,7 @@ class AccountsInListViewModel @Inject constructor(private val api: MastodonApi)
}
}
private inline fun updateState(crossinline fn: State.() -> State) {
private inline fun updateState(fn: State.() -> State) {
_state.value = fn(_state.value)
}
}

View File

@ -143,7 +143,7 @@ internal class ListsViewModel @Inject constructor(private val api: MastodonApi)
}
}
private inline fun updateState(crossinline fn: State.() -> State) {
private inline fun updateState(fn: State.() -> State) {
_state.value = fn(_state.value)
}