conversion: Remove redundant passthrough converter from paths
diff --git a/src/commonMain/kotlin/dev/kdrag0n/colorkt/conversion/ConversionGraph.kt b/src/commonMain/kotlin/dev/kdrag0n/colorkt/conversion/ConversionGraph.kt
index 60cd80b..18a1716 100644
--- a/src/commonMain/kotlin/dev/kdrag0n/colorkt/conversion/ConversionGraph.kt
+++ b/src/commonMain/kotlin/dev/kdrag0n/colorkt/conversion/ConversionGraph.kt
@@ -60,7 +60,7 @@
val visited = HashSet<ConversionEdge>()
val pathQueue = ArrayDeque(listOf(
// Initial path: from node
- listOf(ConversionEdge(from, from) { it })
+ listOf(ConversionEdge(from, from) { it }),
))
while (pathQueue.isNotEmpty()) {
@@ -70,7 +70,7 @@
val node = path.last()
if (node.to == to) {
- return path.map { it.converter }
+ return path.drop(1).map { it.converter }
} else if (node !in visited) {
visited += node
val neighbors = graph[node.to] ?: continue