Skip to content

Commit d1849d2

Browse files
committed
Fix warnings
1 parent 4db82a7 commit d1849d2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

clikt/src/main/kotlin/com/github/ajalt/clikt/core/CliktCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ abstract class CliktCommand(
308308

309309
/** Add the given commands as a subcommand of this command. */
310310
fun <T : CliktCommand> T.subcommands(commands: Iterable<CliktCommand>): T = apply {
311-
_subcommands += commands
311+
_subcommands = _subcommands + commands
312312
}
313313

314314
/** Add the given commands as a subcommand of this command. */
315315
fun <T : CliktCommand> T.subcommands(vararg commands: CliktCommand): T = apply {
316-
_subcommands += commands
316+
_subcommands = _subcommands + commands
317317
}
318318

319319
/**

clikt/src/main/kotlin/com/github/ajalt/clikt/output/text.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ internal fun splitParagraphs(text: String): List<String> {
2626
while (i < text.length) {
2727
val end = if (text.startsWith("```", startIndex = i)) {
2828
PRE_P_END_REGEX.find(text, startIndex = i + 3)?.let {
29-
(it.range.start + 3)..it.range.last
29+
(it.range.first + 3)..it.range.last
3030
}
3131
} else {
3232
PLAIN_P_END_REGEX.find(text, startIndex = i)?.let {
33-
if (it.value.endsWith("```")) it.range.start..(it.range.last - 3)
33+
if (it.value.endsWith("```")) it.range.first..(it.range.last - 3)
3434
else it.range
3535
}
3636
} ?: text.length..text.length

clikt/src/main/kotlin/com/github/ajalt/clikt/parameters/groups/ParameterGroup.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import com.github.ajalt.clikt.core.GroupableOption
66
import com.github.ajalt.clikt.core.ParameterHolder
77
import com.github.ajalt.clikt.output.HelpFormatter
88
import com.github.ajalt.clikt.parameters.options.Option
9-
import com.github.ajalt.clikt.parameters.options.OptionDelegate
10-
import com.github.ajalt.clikt.parameters.options.longestName
119
import com.github.ajalt.clikt.parsers.OptionParser
1210
import kotlin.properties.ReadOnlyProperty
1311
import kotlin.reflect.KProperty

0 commit comments

Comments
 (0)