Skip to content

Commit

Permalink
Mark Registration sub types as data objects
Browse files Browse the repository at this point in the history
Improves `toString` output, especially on JS, which currently translates
to `[object Object]` (rather than `Register` or `Deregister`).
  • Loading branch information
twyatt committed Jan 12, 2024
1 parent 09cda96 commit d50ab10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions koap/src/commonMain/kotlin/Message.kt
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ sealed class Message {
* - `1` (deregister) removes the entry from the list, if present.
*/
sealed class Registration {
object Register : Registration()
object Deregister : Registration()
data object Register : Registration()
data object Deregister : Registration()
}

/**
Expand Down

0 comments on commit d50ab10

Please sign in to comment.