diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2020-07-31 13:06:54 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-31 13:06:54 +0530 |
commit | dc4a9cadc9efe06e166b47a8dfe513d5dacf5993 (patch) | |
tree | b51b155c08c79015c61fa7895c9e430024c7062c /app | |
parent | cea9f4b9421b73b11aea4f619f1ae02e396e967a (diff) |
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>
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt index 2bfa5075..6435a83f 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/oreo/FormField.kt @@ -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 } |