Skip to content

Commit

Permalink
serialize pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielittner committed Oct 6, 2023
1 parent 171449c commit d2a606e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ internal object PatternSerializer : KSerializer<Pattern> {
}

override fun serialize(encoder: Encoder, value: Pattern) {
throw UnsupportedOperationException()
encoder.encodeString(value.value)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public interface DeepLinkHandler {
* segment.
*/
@JvmInline
public value class Pattern(internal val value: String) {
public value class Pattern(public val value: String) {
init {
check(!value.startsWith("/")) { "Pattern should not start with a / but is $value" }
check(!value.contains("?")) { "Pattern should not contain any query parameters but is $value" }
Expand Down

0 comments on commit d2a606e

Please sign in to comment.