Last active
May 26, 2019 19:12
-
-
Save JacquesSmuts/d099eff5e66aa6b1d5de924f87c9e967 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun saveUsername(username: String) { | |
val result = StorageService.getInstance()::saveUsername suspendAndInvokeWith username | |
handleResult(result) | |
} | |
private suspend infix fun <Input, Output> ((Input, (Output) -> Unit) -> Unit).suspendAndInvokeWith(input: Input): Output { | |
return suspendAsync(this, input) | |
} |
val result = StorageService.getInstance()::saveUsername suspendAndInvokeWith username
Good catch, thank you. I've updated it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
should line 3 be the following?
val result = StorageService.getInstance()::saveUsername suspendAndInvokeWith username