Skip to content

Commit 01f3992

Browse files
algolia-botrenovate[bot]millotp
committed
chore(deps): dependencies 2025-01-13 [skip-bc] (generated)
algolia/api-clients-automation#4325 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Algolia Bot <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Pierre Millot <[email protected]>
1 parent b763a4b commit 01f3992

File tree

76 files changed

+818
-1203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+818
-1203
lines changed

Diff for: client/src/commonMain/kotlin/com/algolia/client/configuration/internal/AlgoliaAgent.kt

+4-12
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,13 @@ internal class AlgoliaAgent(clientVersion: String) {
1010
AgentSegment("Algolia for Kotlin", clientVersion),
1111
)
1212

13-
fun add(segment: AgentSegment): Boolean {
14-
return segments.add(segment)
15-
}
13+
fun add(segment: AgentSegment): Boolean = segments.add(segment)
1614

17-
fun add(segments: List<AgentSegment>): Boolean {
18-
return this.segments.addAll(segments)
19-
}
15+
fun add(segments: List<AgentSegment>): Boolean = this.segments.addAll(segments)
2016

21-
fun remove(segment: AgentSegment): Boolean {
22-
return segments.remove(segment)
23-
}
17+
fun remove(segment: AgentSegment): Boolean = segments.remove(segment)
2418

25-
override fun toString(): String {
26-
return segments.joinToString("; ") { it.formatted() }
27-
}
19+
override fun toString(): String = segments.joinToString("; ") { it.formatted() }
2820

2921
private fun AgentSegment.formatted(): String = buildString {
3022
append(value)

Diff for: client/src/commonMain/kotlin/com/algolia/client/configuration/internal/HttpClient.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ internal fun algoliaHttpClient(
1818
agent: AlgoliaAgent,
1919
) = httpClientOf(options) { configure(appId, apiKey, options, agent) }
2020

21-
private fun httpClientOf(options: ClientOptions, block: HttpClientConfig<*>.() -> Unit) =
22-
options.engine?.let { HttpClient(it, block) } ?: HttpClient(block)
21+
private fun httpClientOf(options: ClientOptions, block: HttpClientConfig<*>.() -> Unit) = options.engine?.let { HttpClient(it, block) } ?: HttpClient(block)
2322

2423
internal fun HttpClientConfig<*>.configure(
2524
appId: String,

Diff for: client/src/commonMain/kotlin/com/algolia/client/exception/internal/Throwable.kt

+6-10
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@ import com.algolia.client.exception.AlgoliaRuntimeException
66
import io.ktor.client.plugins.*
77

88
/** Coerce a Throwable to a [AlgoliaClientException]. */
9-
internal fun Throwable.asClientException(): AlgoliaClientException {
10-
return AlgoliaClientException(message = message, cause = this)
11-
}
9+
internal fun Throwable.asClientException(): AlgoliaClientException = AlgoliaClientException(message = message, cause = this)
1210

1311
/** Coerce a [ResponseException] to a [AlgoliaRuntimeException]. */
14-
internal fun ResponseException.asApiException(): AlgoliaApiException {
15-
return AlgoliaApiException(
16-
message = message,
17-
cause = this,
18-
httpErrorCode = response.status.value,
19-
)
20-
}
12+
internal fun ResponseException.asApiException(): AlgoliaApiException = AlgoliaApiException(
13+
message = message,
14+
cause = this,
15+
httpErrorCode = response.status.value,
16+
)

0 commit comments

Comments
 (0)