Skip to content

Commit db61444

Browse files
committed
Remove unused index prop during pointer parsing
1 parent ca38a4a commit db61444

File tree

1 file changed

+4
-13
lines changed
  • src/commonMain/kotlin/io/github/optimumcode/json/pointer

1 file changed

+4
-13
lines changed

src/commonMain/kotlin/io/github/optimumcode/json/pointer/JsonPointer.kt

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ public sealed class JsonPointer(
181181
private class PointerParent(
182182
val parent: PointerParent?,
183183
val segment: String,
184-
val index: Int? = null,
185184
)
186185

187186
private fun buildPath(
@@ -193,18 +192,10 @@ public sealed class JsonPointer(
193192
while (parentValue != null) {
194193
curr =
195194
parentValue.run {
196-
if (index == null) {
197-
SegmentPointer(
198-
segment,
199-
curr,
200-
)
201-
} else {
202-
SegmentPointer(
203-
segment,
204-
curr,
205-
index,
206-
)
207-
}
195+
SegmentPointer(
196+
segment,
197+
curr,
198+
)
208199
}
209200
parentValue = parentValue.parent
210201
}

0 commit comments

Comments
 (0)