Use unsafe cast instead of conversion that creates new array

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-07-07 21:47:10 +02:00
1 parent 9751f80347
commit 5d3c14de2f
26 files changed
+101 -86

No files matched your search

@@ -40,6 +40,6 @@ interface Hash : HashFunction {
}
fun String.encodeToUByteArray() : UByteArray{
return encodeToByteArray().toUByteArray()
return encodeToByteArray().asUByteArray()
}
@@ -53,4 +53,4 @@ fun UByteArray.toHexString() : String {
it.toString(16)
}
}
}
}