Skip to content

Commit

Permalink
refactor(cocoapods): Remove a minor code redundancy
Browse files Browse the repository at this point in the history
Calling `toPod()` recursively, even though the depth of the tree is
limited to two levels. So, the nodes in the recursive calls will always
be scalars.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau authored and sschuberth committed Jul 17, 2024
1 parent 7e776e3 commit 41c5bca
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ private fun YamlNode.toPod(): Pod =
Pod(
name = name,
version = version,
dependencies = value.yamlList.items.map {
val (depName, depVersion) = parseNameAndVersion(it.yamlScalar.content)
Pod(depName, depVersion)
}
dependencies = value.yamlList.items.map { it.toPod() }
)
}

Expand Down

0 comments on commit 41c5bca

Please sign in to comment.