Skip to content

Commit 24f1432

Browse files
committed
Pull the recordCall to where the other selfie types do it.
1 parent 780912b commit 24f1432

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/Selfie.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import com.diffplug.selfie.guts.CallStack
1919
import com.diffplug.selfie.guts.DiskStorage
2020
import com.diffplug.selfie.guts.SnapshotSystem
2121
import com.diffplug.selfie.guts.initSnapshotSystem
22-
import com.diffplug.selfie.guts.recordCall
2322
import kotlin.jvm.JvmStatic
2423

2524
/** A getter which may or may not be run. */
@@ -97,7 +96,7 @@ object Selfie {
9796
*/
9897
@JvmStatic
9998
@ExperimentalSelfieVcr
100-
fun vcrSelfie(sub: String = "") = VcrSelfie(sub, recordCall(false), deferredDiskStorage)
99+
fun vcrSelfie(sub: String = "") = VcrSelfie(sub, deferredDiskStorage)
101100
}
102101

103102
@RequiresOptIn(

jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/VcrSelfie.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package com.diffplug.selfie
1818
import com.diffplug.selfie.guts.CallStack
1919
import com.diffplug.selfie.guts.DiskStorage
2020
import com.diffplug.selfie.guts.atomic
21+
import com.diffplug.selfie.guts.recordCall
2122
import com.diffplug.selfie.guts.reentrantLock
2223
import com.diffplug.selfie.guts.withLock
2324

@@ -27,9 +28,9 @@ private const val CLOSE = "»"
2728
class VcrSelfie
2829
internal constructor(
2930
private val sub: String,
30-
private val call: CallStack,
3131
private val disk: DiskStorage,
3232
) : AutoCloseable {
33+
private val call: CallStack = recordCall(false)
3334
private val state: State
3435

3536
internal sealed class State {

0 commit comments

Comments
 (0)