Skip to content

Commit ff8fc0b

Browse files
committed
prevent collection allocation with stdlib any util
1 parent e7ecd02 commit ff8fc0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protoc-gen-kroto-plus/src/main/kotlin/com/github/marcoferrer/krotoplus/generators/ProtoBuildersGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ object ProtoBuildersGenerator : Generator {
155155

156156
fileSpecBuilder.addFunctions(buildNestedBuildersForMessage(protoType))
157157

158-
if (protoType.nestedMessageTypes.filterNot { it.isMapEntry }.isNotEmpty()) {
158+
if (protoType.nestedMessageTypes.any { !it.isMapEntry }) {
159159
addType(
160160
TypeSpec.objectBuilder(protoType.name)
161161
.buildFunSpecsForTypes(fileSpecBuilder, protoType.nestedMessageTypes)

0 commit comments

Comments
 (0)