Switch to non-deprecated stdlib methods (#990)
min and max were deprecated in favor of minOrNull and maxOrNull respectively to match their names to the typical naming format used by stdlib methods with nullable return types Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
cea9f4b942
commit
dc4a9cadc9
1 changed files with 2 additions and 2 deletions
|
@ -271,7 +271,7 @@ class FormField(
|
|||
}
|
||||
|
||||
infix fun directlyPrecedes(that: Iterable<FormField>): Boolean {
|
||||
val firstIndex = that.map { it.index }.min() ?: return false
|
||||
val firstIndex = that.map { it.index }.minOrNull() ?: return false
|
||||
return index == firstIndex - 1
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ class FormField(
|
|||
}
|
||||
|
||||
infix fun directlyFollows(that: Iterable<FormField>): Boolean {
|
||||
val lastIndex = that.map { it.index }.max() ?: return false
|
||||
val lastIndex = that.map { it.index }.maxOrNull() ?: return false
|
||||
return index == lastIndex + 1
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue