Skip to content

Commit

Permalink
fix: Use non-nullable type for options
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 11, 2024
1 parent a2875d1 commit ea6fc70
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/kotlin/app/revanced/patcher/patch/Option.kt
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ fun intOption(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: Option<Int?>.(Int?) -> Boolean = { true },
validator: Option<Int>.(Int?) -> Boolean = { true },
) = option(
key,
default,
Expand Down Expand Up @@ -264,7 +264,7 @@ fun PatchBuilder<*>.intOption(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: Option<Int?>.(Int?) -> Boolean = { true },
validator: Option<Int>.(Int?) -> Boolean = { true },
) = option(
key,
default,
Expand Down Expand Up @@ -297,7 +297,7 @@ fun booleanOption(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: Option<Boolean?>.(Boolean?) -> Boolean = { true },
validator: Option<Boolean>.(Boolean?) -> Boolean = { true },
) = option(
key,
default,
Expand Down Expand Up @@ -330,7 +330,7 @@ fun PatchBuilder<*>.booleanOption(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: Option<Boolean?>.(Boolean?) -> Boolean = { true },
validator: Option<Boolean>.(Boolean?) -> Boolean = { true },
) = option(
key,
default,
Expand Down Expand Up @@ -363,7 +363,7 @@ fun floatOption(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: Option<Float?>.(Float?) -> Boolean = { true },
validator: Option<Float>.(Float?) -> Boolean = { true },
) = option(
key,
default,
Expand Down Expand Up @@ -396,7 +396,7 @@ fun PatchBuilder<*>.floatOption(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: Option<Float?>.(Float?) -> Boolean = { true },
validator: Option<Float>.(Float?) -> Boolean = { true },
) = option(
key,
default,
Expand Down Expand Up @@ -429,7 +429,7 @@ fun longOption(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: Option<Long?>.(Long?) -> Boolean = { true },
validator: Option<Long>.(Long?) -> Boolean = { true },
) = option(
key,
default,
Expand Down Expand Up @@ -462,7 +462,7 @@ fun PatchBuilder<*>.longOption(
title: String? = null,
description: String? = null,
required: Boolean = false,
validator: Option<Long?>.(Long?) -> Boolean = { true },
validator: Option<Long>.(Long?) -> Boolean = { true },
) = option(
key,
default,
Expand Down

0 comments on commit ea6fc70

Please sign in to comment.