Skip to content

Commit 3d979d7

Browse files
committed
Rename the parameters of alternativeParsing
1 parent 2a8b4a5 commit 3d979d7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/common/src/format/FormatBuilder.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ public sealed interface FormatBuilder {
2323
/**
2424
* Appends a format along with other ways to parse the same portion of the value.
2525
*
26-
* When parsing, the first, [mainFormat] is used to parse the value, and if parsing fails using that, the formats
27-
* from [otherFormats] are tried in order.
26+
* When parsing, the first, [primaryFormat] is used to parse the value, and if parsing fails using that, the formats
27+
* from [alternativeFormats] are tried in order.
2828
*
29-
* When formatting, the [mainFormat] is used to format the value.
29+
* When formatting, the [primaryFormat] is used to format the value.
3030
*/
3131
@Suppress("UNCHECKED_CAST")
3232
public fun <T: FormatBuilder> T.alternativeParsing(
33-
vararg otherFormats: T.() -> Unit,
34-
mainFormat: T.() -> Unit
33+
vararg alternativeFormats: T.() -> Unit,
34+
primaryFormat: T.() -> Unit
3535
): Unit = when (this) {
3636
is AbstractFormatBuilder<*, *> ->
37-
appendAlternativeParsingImpl(*otherFormats as Array<out AbstractFormatBuilder<*, *>.() -> Unit>,
38-
mainFormat = mainFormat as (AbstractFormatBuilder<*, *>.() -> Unit))
37+
appendAlternativeParsingImpl(*alternativeFormats as Array<out AbstractFormatBuilder<*, *>.() -> Unit>,
38+
mainFormat = primaryFormat as (AbstractFormatBuilder<*, *>.() -> Unit))
3939
else -> throw IllegalStateException("impossible")
4040
}
4141

0 commit comments

Comments
 (0)