diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-03-18 23:12:50 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2021-03-18 23:12:50 +0530 |
commit | 2c93600bdf16442b468b80fd1a5379e573c0cac6 (patch) | |
tree | 530313a053128ddf12027b59bb0f6afda686bcc7 /autofill-parser | |
parent | 71a0e02378925f65ffdbf1bbce4e4f76be966216 (diff) |
autofill-parser: opt into ExperimentalUnsignedTypes
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'autofill-parser')
-rw-r--r-- | autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/ext/ByteArray.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/ext/ByteArray.kt b/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/ext/ByteArray.kt index 8a8f3e94..798eec85 100644 --- a/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/ext/ByteArray.kt +++ b/autofill-parser/src/main/java/mozilla/components/lib/publicsuffixlist/ext/ByteArray.kt @@ -23,6 +23,7 @@ private const val BITMASK = 0xff.toByte() * https://github.com/square/okhttp/blob/1977136/okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt */ @Suppress("ComplexMethod", "NestedBlockDepth") +@OptIn(ExperimentalUnsignedTypes::class) internal fun ByteArray.binarySearch(labels: List<ByteArray>, labelIndex: Int): String? { var low = 0 var high = size @@ -55,7 +56,7 @@ internal fun ByteArray.binarySearch(labels: List<ByteArray>, labelIndex: Int): S // Compare the bytes. Note that the file stores UTF-8 encoded bytes, so we must compare // the // unsigned bytes. - @Suppress("EXPERIMENTAL_API_USAGE") compareResult = (byte0.toUByte() - byte1.toUByte()).toInt() + compareResult = (byte0.toUByte() - byte1.toUByte()).toInt() if (compareResult != 0) { break } |