Skip to content

Commit 53ae4eb

Browse files
committed
detekt
1 parent 88efcf0 commit 53ae4eb

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/StreamScope.kt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ import kotlin.js.JsName
2626
* Failure of one request will not cancel all streams in the others.
2727
*/
2828
@OptIn(InternalCoroutinesApi::class)
29-
@Deprecated("StreamScope is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html", level = DeprecationLevel.WARNING)
29+
@Deprecated(
30+
"StreamScope is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html",
31+
level = DeprecationLevel.WARNING
32+
)
3033
public class StreamScope internal constructor(
3134
parentContext: CoroutineContext,
3235
internal val role: Role,
33-
): AutoCloseable {
36+
) : AutoCloseable {
3437
internal class Element(internal val scope: StreamScope) : CoroutineContext.Element {
3538
override val key: CoroutineContext.Key<Element> = Key
3639

@@ -171,7 +174,10 @@ public suspend fun <T> callScoped(callId: String, block: suspend CoroutineScope.
171174
* }
172175
* ```
173176
*/
174-
@Deprecated("streamScoped is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html", level = DeprecationLevel.WARNING)
177+
@Deprecated(
178+
"streamScoped is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html",
179+
level = DeprecationLevel.WARNING
180+
)
175181
@OptIn(ExperimentalContracts::class)
176182
public suspend fun <T> streamScoped(block: suspend CoroutineScope.() -> T): T {
177183
contract {
@@ -207,7 +213,10 @@ private fun CoroutineContext.checkContextForStreamScope() {
207213
*/
208214
@JsName("StreamScope_fun")
209215
@ExperimentalRpcApi
210-
@Deprecated("StreamScoped is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html", level = DeprecationLevel.WARNING)
216+
@Deprecated(
217+
"StreamScoped is deprecated, see https://kotlin.github.io/kotlinx-rpc/0-6-0.html",
218+
level = DeprecationLevel.WARNING
219+
)
211220
public fun StreamScope(parent: CoroutineContext): StreamScope {
212221
parent.checkContextForStreamScope()
213222

0 commit comments

Comments
 (0)