This file contains 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
sealed class GoodCountries(val order: Int) { | |
class Brazil : GoodCountries(0) | |
class USA : GoodCountries(1) | |
class Germany : GoodCountries(2) | |
class China : GoodCountries(3) | |
} |
This file contains 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
package com.example.app.utils | |
import org.jetbrains.annotations.TestOnly | |
/** | |
* Generic singleton implementation. | |
* | |
* # Usage | |
* | |
* First, defining your singleton: |
This file contains 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
[package] | |
name = "example" | |
version = "0.1.0" | |
authors = ["chriscoomber <christopher.coomber@metaswitch.com>"] | |
[dependencies] | |
futures = "*" | |
tokio-core = "*" |