From 1bb4f9dca27464f627c353ec2953f0e5a211cccf Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Tue, 22 Oct 2024 20:29:30 +0000 Subject: [PATCH] style(internal): simplify client build method --- .../com/lithic/api/client/okhttp/LithicOkHttpClient.kt | 5 ++--- .../com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt index cfe85809..12a56fd3 100644 --- a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt +++ b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt @@ -72,8 +72,8 @@ class LithicOkHttpClient private constructor() { fun fromEnv() = apply { clientOptions.fromEnv() } - fun build(): LithicClient { - return LithicClientImpl( + fun build(): LithicClient = + LithicClientImpl( clientOptions .httpClient( OkHttpClient.builder() @@ -84,6 +84,5 @@ class LithicOkHttpClient private constructor() { ) .build() ) - } } } diff --git a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt index 7536290d..ab6ef6e9 100644 --- a/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt +++ b/lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt @@ -72,8 +72,8 @@ class LithicOkHttpClientAsync private constructor() { fun fromEnv() = apply { clientOptions.fromEnv() } - fun build(): LithicClientAsync { - return LithicClientAsyncImpl( + fun build(): LithicClientAsync = + LithicClientAsyncImpl( clientOptions .httpClient( OkHttpClient.builder() @@ -84,6 +84,5 @@ class LithicOkHttpClientAsync private constructor() { ) .build() ) - } } }