Address some build warnings
This commit is contained in:
@@ -14,6 +14,6 @@ fun launchUI(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
fun launchIO(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
GlobalScope.launch(Dispatchers.IO, CoroutineStart.DEFAULT, block)
|
||||
|
||||
@UseExperimental(ExperimentalCoroutinesApi::class)
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
fun launchNow(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
GlobalScope.launch(Dispatchers.Main, CoroutineStart.UNDISPATCHED, block)
|
||||
|
||||
@@ -44,7 +44,7 @@ fun String.byteSize(): Int {
|
||||
* Returns a string containing the first [n] bytes from this string, or the entire string if this
|
||||
* string is shorter.
|
||||
*/
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun String.takeBytes(n: Int): String {
|
||||
val bytes = toByteArray(Charsets.UTF_8)
|
||||
return if (bytes.size <= n) {
|
||||
|
||||
Reference in New Issue
Block a user