perf(config): 优化配置使用过程中的判断.

通过调整部分属性的 null-safety 特性, 移除了部分 non-null 判断, 略微(真的很略微)提高了性能(虽然仅限于启动).
This commit is contained in:
2022-06-24 19:08:41 +08:00
parent b12758bd18
commit a1790a0716
2 changed files with 3 additions and 5 deletions

View File

@ -45,7 +45,7 @@ data class BotConfig(
*/
val extensions: Set<Artifact> = emptySet(),
val proxy: ProxyConfig = ProxyConfig(type = ProxyType.NO_PROXY),
val baseApiUrl: String? = ApiConstants.BASE_URL
val baseApiUrl: String = ApiConstants.BASE_URL
)
enum class ProxyType {